Forum Jump :

Author Message


Posts: 17
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2013-03-25 20:44        
     
Hello Fellow Editors,

I currently have a trigger attached to an object and I set the object's probability of presence to 50% so sometimes the object does not spawn at all but the trigger still spawns. I have the trigger set to activate whenever the object is not present. Therefore, even when the object was never really there from the beggining of the mission the trigger still executes.

I have been searching since last night and been experimenting on the editor by linking/grouping it hoping that the probability of presence of the trigger can be consistent with the object it is attached to.

My objective is to have the trigger spawn with the object. Hence, if the object does not spawn, the trigger will now spawn as well.

Thanks for your time, please let me know if you need more clarification or other questions.


Author Message


Posts: 5
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2013-03-27 11:12        
     
have you tried doing the opposite? rewriting your triggers so they check if the unit is present and have it do the opposite of what it'd do if it were absent?

Or maybe check whether it's present, and then check later if it's not present anymore, but that would double your amount of triggers.


Or, if the object you're speaking of is a unit, set the trigger to check whether it's alive instead of whether it's present.


Advertisement


Author Message


Posts: 17
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2013-03-29 02:00        
     
Thnanks for the response, what I really wanted to do was to have an object spawn on random location or perhaps not spawn at all. I have a trigger to keep track of the object (condition: if alive). So my problem, when the object does not spawn the trigger activates. But I only want it to activate whenever it gets killed by a blufor not when it did not spawn.

Anyhow, I decided to give up on the idea and explored other alternatives such us just spawning the object 100% but can spawn into 20 different locations.

Would still be nice to know if this is possible though. Basically if the unit does not spawn, the trigger that is attached to it will not either.

Thanks for your time~


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2013-03-29 02:11        
     
leave the probability of presence 100% and then in the init you can set it to delete itself and the trigger (tr1)


if (random 100 >50) then {tr1 attachto [this,[0,0,0]]} else {deleteVehicle tr1;deleteVehicle this}


Author Message


Posts: 17
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2013-03-29 14:32        
     
# F2kSel : leave the probability of presence 100% and then in the init you can set it to delete itself and the trigger (tr1)


if (random 100 >50) then {tr1 attachto [this,[0,0,0]]} else {deleteVehicle tr1;deleteVehicle this}

I really appreciate this. Cheers~