I have also a "script" question. I want to implement the "ammo" concept. The four creatures from SGA can shoot, but every time they shoot the ammo variable should decrease by 1 and stored between battles
AMMO artefact (bullets for weapons)
Example:
!#VRv99:S100; create ammo variable, will be reseted to 100 every time SGA buys AMMO
!?BG0;
!!BG:A?v4; action shoot
!!BG&v4=7:N?v5; shooting stack=v5
!!BMv5&v4=7/v5>=0/T?v7; shooting stack type
!!FU&v4<>7:E; exit if other action
!!VRv99|v7=174/v7=175/v7=176/v7=178:-1; **if one of the 4 SG members shoot, decrease ammo value
Now: how should I script this to CANCEL shooting ability if v100>=0? I mean, the cursor shows shooting but the action is canceled and the creature can only attack melee.
I tried
!!BG&v99<=0/v4=7:A2; **walk in place if no more AMMO (but it still let me shoot) How to cancel shoot...
Should I remove entirely the ability during battle if v99<=0 like:
!!BG&v99<=0;
!!MA:X174/?v300; save natural abilities in v300
!!VRj:Sv300 &6*-1; check for shooting ability;
!!VRk:Sv300+j; get rid of it if so
!!MA:X174/k;
and for every member? And where to place it in previous code?
(This post was last modified: 22.10.2009 01:12 by Valery.)