OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: LCD on 14 Jul 2007, 02:17:26
-
just a note
it seems dat da US ver of ArmA 1.08 (didnt check versions b4 dat) has a bug w/ eventhandlers :blink:
i want my soldier 2 shot just 1 shot usin evethandler so i used
snip addeventhandler ["fired",{(_this select 0) removemagazines "10Rnd_762x54_SVD"}]
and it worked on my and on all da non american testers... but it CTDed all da american testers game...
LCD OUT
-
Did you tried this:
snip addeventhandler ["fired","(_this select 0) removemagazines ""10Rnd_762x54_SVD"" "]In ArmA there is a difference between strings("") and code({}) and since addEventhandler requires a string you cant use {}. But it is weird that it crashed or worked instead of just producing an error message. ???
-
T_D, you can easily use strings in eventHandlers, for example
this addEventHandler ["hit",{hint "ouch"}]works just fine..
I remember OFP having an issue with removing weapons/ammo (can't remember which it was) from an AI if it was targeting an enemy unit, it caused the game to crash..
That of course doesn't explain this CTD happening only with the Atari version of the game.. :(
-
yea i tried both kind of syntax
also it seems 2 crash ArmA also on da Czech version... i donno exactly what kinds of diff vers r dere
LCD OUT
-
LCD,
How about if you have the eventhandler call a script instead. Then put the remove code inside the script. Maybe that will sneak past this bug.