Page 4 of 6

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 10:59 pm
by ~Seraphim
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.

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Feb 08, 2016 12:19 pm
by Slvr99
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!

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Feb 08, 2016 8:37 pm
by cubrr
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.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 21, 2016 7:20 am
by A2ON
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 :-)-

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Feb 29, 2016 9:55 am
by Slvr99
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

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Feb 29, 2016 6:41 pm
by cubrr
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.

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Feb 29, 2016 6:54 pm
by ~Lambder
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.

Re: [ DEV ] InfinityScript Suggestions

Posted: Fri Mar 04, 2016 2:56 am
by A2ON
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

Re: [ DEV ] InfinityScript Suggestions

Posted: Fri Mar 04, 2016 3:50 pm
by cubrr
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.

Re: [ DEV ] InfinityScript Suggestions

Posted: Fri Mar 04, 2016 3:51 pm
by ~Seraphim
I'm confused. Did you just mix STL with GSC?