[ DEV ] InfinityScript Suggestions

InfinityScript plugins for dedicated servers.
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

Re: [ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Sun Feb 07, 2016 10:59 pm

cubrr wrote:
c4271605 wrote:One thing I have noticed however is that IS uses some methods that MW3 doesn't actually have.

And these are?

Too many to name.
But many functions called during AddFunctionMapping where it maps the index of the script callback don't exist in MW3.
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Feb 08, 2016 12:19 pm

c4271605 wrote:
cubrr wrote:
c4271605 wrote:One thing I have noticed however is that IS uses some methods that MW3 doesn't actually have.

And these are?

Too many to name.
But many functions called during AddFunctionMapping where it maps the index of the script callback don't exist in MW3.

Speaking of that, I've never ever seen "rotatingIcon()" under hudElems ever be used in the GSC of any CoD game... It's mapped in IS but never in the actual game... It'd probably be nice to use too!
cubrr
TeknoMan
TeknoMan
Posts: 138
Joined: Sun Oct 05, 2014 12:54 am

Re: [ DEV ] InfinityScript Suggestions

Postby cubrr » Mon Feb 08, 2016 8:37 pm

By the way, here are the damage flags seen in OnPlayerDamage and OnPlayerKilled (the int dFlags parameter):

Code: Select all

[Flags]
public enum DamageFlags
{
    /// <summary>
    /// Damage was indirect.
    /// </summary>
    Radius = 1,
    /// <summary>
    /// Armor does not protect from this damage
    /// </summary>
    NoArmor = 2,
    /// <summary>
    /// Does not affect velocity, only view angles.
    /// </summary>
    NoKnockback = 4,
    /// <summary>
    /// Damage occurred after one or more penetrations.
    /// </summary>
    Penetration = 8,
    /// <summary>
    /// Damage was non-lethal.
    /// </summary>
    Stun = 16,
    /// <summary>
    /// Missile impacted on the front of the victim's riot shield.
    /// </summary>
    ShieldExplosiveImpact = 32,
    /// <summary>
    /// Missile impacted on the front of the victim's riot shield
    /// and was from a projectile with "Big Explosion" checked on.
    /// </summary>
    ShieldExplosiveImpactHuge = 64,
    /// <summary>
    /// Explosive splash damage, somewhat deflected by the victim's shield.
    /// </summary>
    ShieldExplosiveSplash = 128,
    /// <summary>
    /// Game script defined flag.
    /// </summary>
    NoTeamProtection = 256,
    /// <summary>
    /// Game script defined flag.
    /// </summary>
    NoProtection = 512,
    /// <summary>
    /// Game script defined flag.
    /// </summary>
    PassThru = 1024
}


NoProtection is the only script-defined flag that I've seen referenced in the GSCs.
User avatar
A2ON
TeknoDog
TeknoDog
Posts: 49
Joined: Fri Jun 19, 2015 9:19 am

Re: [ DEV ] InfinityScript Suggestions

Postby A2ON » Sun Feb 21, 2016 7:20 am

Slvr99 wrote:
c4271605 wrote:
Slvr99 wrote:Interesting that the "pers" field returns as null by IS...

Code: Select all

Exception during RunAll call: System.InvalidCastException: Null object can not be converted to a value type.


I should've guessed anyway since it returns an array that isn't manageable by C# =P

What does "pers" field supposed to do or is supposed to contain?

"pers" contains persistant data for each match like killstreak data, some loadout data, and general match data. It uses a GSC Array, meaning we can't use it in C#.


IS can use struct to read the GSC Array. Just need to know the length of the array

e.g. Vector3 :-)-
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Feb 29, 2016 9:55 am

A2ON wrote:
Slvr99 wrote:
c4271605 wrote:
Slvr99 wrote:Interesting that the "pers" field returns as null by IS...

Code: Select all

Exception during RunAll call: System.InvalidCastException: Null object can not be converted to a value type.


I should've guessed anyway since it returns an array that isn't manageable by C# =P

What does "pers" field supposed to do or is supposed to contain?

"pers" contains persistant data for each match like killstreak data, some loadout data, and general match data. It uses a GSC Array, meaning we can't use it in C#.


IS can use struct to read the GSC Array. Just need to know the length of the array

e.g. Vector3 :-)-

I don't think that works. I get the usual "Cannot cast from source type to definition type" and I used all of the array keys. =P
cubrr
TeknoMan
TeknoMan
Posts: 138
Joined: Sun Oct 05, 2014 12:54 am

Re: [ DEV ] InfinityScript Suggestions

Postby cubrr » Mon Feb 29, 2016 6:41 pm

A2ON wrote:IS can use struct to read the GSC Array. Just need to know the length of the array

e.g. Vector3 :-)-

I'm awfully curious how you've managed to read an array with IS.
User avatar
~Lambder
TeknoSheep
Posts: 448
Joined: Thu Apr 11, 2013 5:40 pm
Location: Meadow.
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby ~Lambder » Mon Feb 29, 2016 6:54 pm

cubrr wrote:
A2ON wrote:IS can use struct to read the GSC Array. Just need to know the length of the array

e.g. Vector3 :-)-

I'm awfully curious how you've managed to read an array with IS.

lol, same here.
User avatar
A2ON
TeknoDog
TeknoDog
Posts: 49
Joined: Fri Jun 19, 2015 9:19 am

Re: [ DEV ] InfinityScript Suggestions

Postby A2ON » Fri Mar 04, 2016 2:56 am

cubrr wrote:
A2ON wrote:IS can use struct to read the GSC Array. Just need to know the length of the array

e.g. Vector3 :-)-

I'm awfully curious how you've managed to read an array with IS.


I building EXO_MODE plugin. need use "getvelocity" gsc function. this function return an array.

I have tried many ways failed to successfully read this array.

Finally use Vector3 successfully read the first three entries in this array.

I've created a struct can be read successfully found.

you can try :-D
cubrr
TeknoMan
TeknoMan
Posts: 138
Joined: Sun Oct 05, 2014 12:54 am

Re: [ DEV ] InfinityScript Suggestions

Postby cubrr » Fri Mar 04, 2016 3:50 pm

A2ON wrote:
cubrr wrote:
A2ON wrote:IS can use struct to read the GSC Array. Just need to know the length of the array

e.g. Vector3 :-)-

I'm awfully curious how you've managed to read an array with IS.


I building EXO_MODE plugin. need use "getvelocity" gsc function. this function return an array.

I have tried many ways failed to successfully read this array.

Finally use Vector3 successfully read the first three entries in this array.

I've created a struct can be read successfully found.

you can try :-D

I'd hate to break the news to you, but GetVelocity returns a Vector3, not an array. Perhaps you're mixing the term "Vector3" in this context with "vector" as in std::vector. If you want to see for yourself, open up iw5mp_server.exe with IDA and go to 0x479D80.
User avatar
~Seraphim
TeknoHorse
TeknoHorse
Posts: 1186
Joined: Sun Jan 12, 2014 10:36 pm

Re: [ DEV ] InfinityScript Suggestions

Postby ~Seraphim » Fri Mar 04, 2016 3:51 pm

I'm confused. Did you just mix STL with GSC?

Return to “InfinityScript”

Who is online

Users browsing this forum: No registered users and 9 guests