Jump to content


Photo

Some questions about scripts and effects


  • Please log in to reply
20 replies to this topic

#21 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 16 November 2010 - 07:29 AM

does it mean, for instance, that a spell with duration 300 has the same duration of a global timer with duration 200?

Never heard about it before, unless it's something very specific. For all I know, scripts and effects use the same timing. Try this to see for yourself.
IF
!GlobalTimerNotExpired("mytimer","global")
THEN
RESPONSE #100
SetGlobalTimer("mytimer","global",25)
ActionOverride(Player1,ReallyForceSpell(Myself,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)) // is 24 long
END

A question about opcode 12 (damage). Damage kind is counted in a different way as in extended headers; I've also noticed that they work bitwise: 0b0 is crushing, 0b10 , 0b100 and so on are all different kinds.
Does it mean that you can sum them, to make 'compound damages' such as 'blunt/missile'? (the image in my sig came out in an attempt to get fire/fists damage; the machine didn't know if the target should die... But perhaps with better combinations it works; I don't know, though, how I can actually test it.)

Yeah, one nice sig you have there :) Wanted to ask where it came from, but forgot to do.

It is possible to stack bits sometimes, I know that 42 and 62 work correctly if you set the 2nd parameter to a sum (1+2+4+8=15), it yields the same as separate effects. But apparently there're limitations, as you've found out.

Retired from modding.