Jump to content
Sign in to follow this  
kocrachon

Game Crashing

Recommended Posts

So I have a mission I scripted that tends to crash when we destroy a whole bunch of enemy empty tanks with satchel charges. It crashes when i blow them all up, or even one at a time. Well more specifically it kicks people out of my server. Now I was wondering if too many explosions would cause this, or do I have too many triggers?

Because I have it set to where each vehicle has its own trigger, and it works to where you destroy them in order, so the first one activates the second ones waypoint, and so forth, and it always happens on the last few.

Share this post


Link to post
Share on other sites

Heres my triggers.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">enem2 setTriggerArea [7, 7, 0, true]; enem2 setTriggerActivation ["VEHICLE", "NOT PRESENT", false]; enem2 setTriggerType "NONE"

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">enem3 setTriggerArea [7, 7, 0, true]; enem3 setTriggerActivation ["VEHICLE", "NOT PRESENT", false]; enem3 setTriggerType "NONE"

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">enem4 setTriggerArea [7, 7, 0, true]; enem4 setTriggerActivation ["VEHICLE", "NOT PRESENT", false]; enem4 setTriggerType "NONE"

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">enem5 setTriggerArea [7, 7, 0, true]; enem5 setTriggerActivation ["VEHICLE", "NOT PRESENT", false]; enem5 setTriggerType "NONE"

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">exfil setTriggerArea [20, 20, 0, true]; exfil setTriggerActivation ["WEST", "PRESENT", false]; exfil setTriggerType "END1"; NewWP = (group B1) addWaypoint [getMarkerPos "banana",0]; [group B1,3] setwaypointtype "JOIN"; (Group B1) setcurrentwaypoint [group B1, 3]; [group B1,3] synchronizeWaypoint [[group S1,5]]

B1 is the name of a blackhawk that is currently stationed at a base that will take off with that last trigger, and it will fly to my extraction point, which has a marker for its pos named banana. It will fly to that waypoint, and it will join my group. Now it crashes all but 1 person. So I am wondering why its doing that. Is it I have too much crammed onto one trigger or what?

Share this post


Link to post
Share on other sites

Id also like to note that it doesn't crash when the triggers aren't their. So could some one tell me what the flaw is in my triggers thats crashing the server?

Share this post


Link to post
Share on other sites

If you're using "VEHICLE" for activation, you need to attach the trigger to a vehicle (just like you would have to synchronize the trigger with the target vehicle in the editor). You must use triggerAttachVehicle when using "VEHICLE" for the activation (same goes with "GROUP", "LEADER", and "MEMBER"), otherwise you're just asking for a crash. So you would use that command to attach it to the specific vehicle you are detecting for.

Share this post


Link to post
Share on other sites

so I will have to name all the tanks, and then make a trigger that upon activation does triggerAttachVehicle for each vehicle and its corresponding vehicle?

Ok right now I am crashing the other players at the start of the map though..

Here is how I have my trriggerattach vehicl set

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">enem1 triggerAttachVehicle [enem2]

enem1 is the name of the trigger right now, enem2 is the name of the vehicle I am attaching it to.

Share this post


Link to post
Share on other sites

Are you certain enem1 is the name of your trigger? Perhaps using that command on a non-trigger causes the crash?

Share this post


Link to post
Share on other sites

In what order are you using all of those commands (including creating the trigger), could you please list (in order) exactly what code you have written?

Share this post


Link to post
Share on other sites

Well, at the moment I have one trigger do this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP = (group B1) addWaypoint [getMarkerPos "rtb",0]; [group B1,2] setwaypointtype "MOVE"; (Group B1) setcurrentwaypoint [group B1, 2]; [Group B1, 2] setWaypointStatements ["true",'B1 land "LAND"']; enem1 triggerAttachVehicle [enem2]

the on trigger enem1

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP = (group B1) addWaypoint [getMarkerPos "banana",0]; [group B1,3] setwaypointtype "JOIN"; (Group B1) setcurrentwaypoint [group B1, 3]; [group B1,3] synchronizeWaypoint [[group S1,5]]; exfil setTriggerArea [50, 50, 0, true]; exfil setTriggerActivation ["WEST", "PRESENT", false]; exfil setTriggerType "END1"

Share this post


Link to post
Share on other sites

Ok I think you're trying to do something that you shouldn't. Are you trying to modify an existing trigger or something? It's not necessary and IMO bad practice to keep recycling the same triggers or modify existing triggers during a session. If you need a trigger that does something else then you should create a new one, triggers aren't meant to be used like that. It looks as if you're attempting to set up your triggers mid-mission through other triggers, and that's bad mission design. I'd like you to prove me wrong however by showing me that you are infact referring to newly created triggers (by showing me the commands you used to create them), and that you're using the commands properly (and when you create a trigger it's good practice to use all of the setTrigger... commands to make sure everything is properly set). I'd also like to let you know that it's not very wise to design missions that use a lot of created waypoints and triggers anyway. You're probably getting a little carried away with these new commands, it's far more practical to create and set up all of your triggers and waypoints in the editor and not during the mission itself, especially if you ever need to debug or modify your mission, otherwise it's sort of like trying to write a book as you're in the middle of reading it (doesn't make much sense does it).

Share this post


Link to post
Share on other sites

Well I am using so many create waypoints because I cant get the unload transport waypoint to work on my dedicated server. So I have to force the helicopter to land, which If i use the land command it takes right back off if it has a following waypoint. So I tell it to land, I get into a truck which sets off a trigger to make the waypoint that tells the blackhawk to leave again.

I wouldn't need all these create way points if it wasn't for the fact that the dedicated server system isn't very well developed yet.

As for the waypoint. It is an existing waypoint. But I guess my problem might be that I am not using all of the settrigger commands. The trigger is already there, and what I currently did with it, is I have it set to vehicle, by grouping it with the vehicle, and when that vehicle is destroyed it tells the blackhawk to go to its next waypoint and it activates the exfil point (which is also already on the map set at 0,0,0, which the trigger makes it 50,50,0)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×