Can someone explain what script signals are? - Page 2

Can someone explain what script signals are?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Can someone explain what script signals are?

Post by FLOZi »

Yes, but just pointing out that you can have 32 numerical IDs.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Can someone explain what script signals are?

Post by smoth »

how? the code says "OH HEY A NUMBER, TREAT IT AS BITWISE"
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Can someone explain what script signals are?

Post 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. :?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Can someone explain what script signals are?

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Can someone explain what script signals are?

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Can someone explain what script signals are?

Post by smoth »

of course but in this example we were talking about weapon aiming anims. which is why flozi made his suggestion.
User avatar
NeonStorm
Posts: 173
Joined: 23 May 2012, 18:36

Re: Can someone explain what script signals are?

Post 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 :/
Post Reply

Return to “Game Development”