Page 2 of 2

Re: Can someone explain what script signals are?

Posted: 03 Feb 2013, 18:32
by FLOZi
Yes, but just pointing out that you can have 32 numerical IDs.

Re: Can someone explain what script signals are?

Posted: 03 Feb 2013, 18:53
by smoth
how? the code says "OH HEY A NUMBER, TREAT IT AS BITWISE"

Re: Can someone explain what script signals are?

Posted: 03 Feb 2013, 19:04
by FLOZi
2^0 = 1,
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?

Posted: 03 Feb 2013, 19:05
by smoth
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?

Posted: 03 Feb 2013, 19:12
by zwzsg
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.

Re: Can someone explain what script signals are?

Posted: 03 Feb 2013, 19:14
by smoth
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?

Posted: 25 Feb 2013, 03:58
by NeonStorm
So you are saying my signal tag can be a function? That makes very little sense to me.
Shouldn't that solve all the issues?

Code: Select all

function Foo()
Signal(Foo)
SetSignalMask(Foo)
-- Do Stuff
end
NoParallelExecution(Foo) would be simplier to understand, because it only does what it says it does and exactly what it says it does.

I always think Signal/SetSignalMask - for which event and in which context :/