Can someone explain what script signals are?
Moderator: Moderators
Re: Can someone explain what script signals are?
Yes, but just pointing out that you can have 32 numerical IDs.
Re: Can someone explain what script signals are?
how? the code says "OH HEY A NUMBER, TREAT IT AS BITWISE"
Re: Can someone explain what script signals are?
2^0 = 1,
2^31 = (2^32) / 2
If it's a 32 bit integer then there are 32 possible non-colliding bit masks.
2^31 = (2^32) / 2
If it's a 32 bit integer then there are 32 possible non-colliding bit masks.
Re: Can someone explain what script signals are?
Oh, i get what you are at, I was thinking the weaponID was the id of the weapon in the table, not like weapon 1, 2 etc.
Re: Can someone explain what script signals are?
There are 32 bits in a number.
Well, usually. Not to deny the importance of 8, 16, and 64 bits platforms.
Also, since the 32nd bit is the sign, I'm uncertain it'll work as well as the other bits.
In short, keep your code with the unique empty tables and forget about those complicated bitmasks.
No, the weapon ID is independent from the signal. Signal aren't only used for aiming, they are also useful for activate/deactivate, move/stop, or really anything you want.
Well, usually. Not to deny the importance of 8, 16, and 64 bits platforms.
Also, since the 32nd bit is the sign, I'm uncertain it'll work as well as the other bits.
In short, keep your code with the unique empty tables and forget about those complicated bitmasks.
No, the weapon ID is independent from the signal. Signal aren't only used for aiming, they are also useful for activate/deactivate, move/stop, or really anything you want.
Re: Can someone explain what script signals are?
of course but in this example we were talking about weapon aiming anims. which is why flozi made his suggestion.
Re: Can someone explain what script signals are?
Shouldn't that solve all the issues?So you are saying my signal tag can be a function? That makes very little sense to me.
Code: Select all
function Foo()
Signal(Foo)
SetSignalMask(Foo)
-- Do Stuff
end
I always think Signal/SetSignalMask - for which event and in which context :/