Meteora 10 Posted October 3, 2013 Hello People :-), this is my first post on this forum, please don't be harsh. However, i've started scripting & editing yesterday and i've got a question. When you're in the editor, you can set new triggers which fire if you activate your alpha radio for example. It is working, but what if i want another trigger, like if a player enteres a area, a trigger will be fired and my script will be executed. If you still don't understand my problem: I want to make a new gunstore in the wasteland map, and i want to be able to press 'e' to activate the shop when i'm in the area. How do i make new Events? For example: - Playerspawn - Player enters a special area - Player dies ... and so on. I thank you for reading! Meteora Share this post Link to post Share on other sites
MadM0nkey 1 Posted October 3, 2013 (edited) Hi Meteora and welcome to the forums =) you might want to start out by searching google for video tutorials on how to use the arma2 editor here is a few I found on dealing with the placing triggers: ArmA 2 Editor Tutorial - Triggers Part 1 ArmA 2 Editor Tutorial - Triggers Part 2 Arma 2 Tutorial: Basics of Radio Triggers here is one on objectives ArmA 2 Editor Tutorial - Objectives <edit> here is a quick example of a trigger switch .. create a trigger on the map keyboard F3-Key now *double click map* close to your BLUEFOR West troop player make sure in the settings of the trigger are the same as follows: Axis A:20 Axis B:20 Angle:0 set to [Ellipse] Activation:BLUEFOR set to [once] and [present] and [timeout] Type: [switch] Condition: this On Act: *copy and paste the below code into the On Act: empty field*: hint " message: Trigger Activated! ..hey it works"; nul = [] spawn {_bomb = "Bo_GBU12_LGB" createVehicle getpos player}; click ok > then click >preview now walk into the area where you placed the trigger on the map. hope that helps get you started & Gluck =) Edited October 3, 2013 by MadM0nkey more bang for the buck Share this post Link to post Share on other sites
Meteora 10 Posted October 5, 2013 Hey MadM0nkey :-) Thank you very much for your help! I do understand it now, thank you. =-) Nice example there! I've got a little another question: I have a script like this: while {!b_playerDead} do{ if (!alive player) then{ [] call func_dead; } else{ [] call func_alive; }; }; func_alive = { hint "Still alive ..."; }; func_dead = { hint "Dead ..."; }; ======================================= Why is the code not executing my functions? Did i do something wrong with calling the functions? I tried so much, and nothing worked so far :-( Share this post Link to post Share on other sites
cobra4v320 27 Posted October 5, 2013 func_alive = {hint "Still alive ..."}; func_dead = {hint "Dead ..."}; while {!b_playerDead} do { if (!alive player) then { [] call func_dead; } else { [] call func_alive; }; }; Share this post Link to post Share on other sites
Meteora 10 Posted October 8, 2013 Oooooh, i see... Normally it's the same, but i have to declare the functions above the method where i am calling it, right? Thank you! Share this post Link to post Share on other sites