Sauerworld Forum
Sauerbraten Content => Scripts => Topic started by: Alu on September 18, 2015, 09:48:13 PM
-
i have no idea what I'm doing
but the idea is that when you have the saw the hudgun is turned on
at least I'm close to achieving something :o ??
cierrahudgun = [cierra; cierraon; cierraoff]
cierra = [ sleep 10 [if (&& (= (getweapon) 7) (= contador 1)) [hudgun 1]] cierra ]
cierraon = [ sleep 9 [if (= (getweapon) 7) [contador = 1]] cierraon ]
cierraoff = [ sleep 8 [if (&& (= contador 1) (!= (getweapon) 7)) [contador = 0]] cierraoff ]
cierrahudgun
umm I suspect the problem is with the "contador = 1, contador = 0" the counter
-
Everywhere you want to get the value of contador, you need to use '$'.
E.g.
if (= $contador 1) ...
I think it should work then.
-
with more common sense:
------
contador = 1
cierra = [if (&& (= (getweapon) 7) (= $contador 1)) [hudgun 1] [hudgun 0]]
cierra
----------
why the hell does not work? :'v
It did not work as it was before
and it does not work now
-
dont know wheres the problem with my linear code ¿?
copying and passing the structure of another in my config (ardelico weapons sens)
this works well :) :
--------------------------
cierrahudgun = [cierra]
escopetahudgun = [escopeta]
cierra = [
sleep 5 [
if (= (getweapon) 0) [hudgun 1] [hudgun 0]
] cierra
]
escopeta = [
sleep 5 [
if (= (getweapon) 1) [hudgun 1] [hudgun 0]
] escopeta
]
cierrahudgun
escopetahudgun
-------------------------
the game does not like the linear code :v ?
I find it very confusing if he is not linear
-
haha still not working
I think that this fixed:
cierrahudgun = [armas]
armas = [
sleep 5 [
if (|| (= (getweapon) 1) (= (getweapon) 0)) [hudgun 1] [hudgun 0]
] armas
]
cierrahudgun
-
try clearing configs
-
try clearing configs
No, it was not that, was the syntax the [] and () spaces or something
- I have always clean the config file
this works well:
----------------------------------------------------------
weaphudguns = [weapons]
Weapons = [
sleep 5 [
if (|| (= (getweapon) 1) (= (getweapon) 0)) [hudgun 1] [hudgun 0]
] weapons
]
weaphudguns
-
Why are you guys using "weaphudsguns", while "weapons" is the exact same thing in the script?
-
I don't think they even know what they're trying to do in the first place.
-
nice necro bumps.
[closed]