Jump to content
Sign in to follow this  
D.murphy man

Strang proplem with markers and create unit

Recommended Posts

using "coop essentials" package i'm trying to set up a simple trigger system to allow units (in my case zombies) to spawn every time players enter the area, instead of just one off spawn as "coop essentials" currently does.

Now in theory this should be simple, using an object (a roadcone) with an attach init to activate coop essentials will spawn the desired units and delete the object, thus meaning no more spawns when player unit enters the same area again.

To get around this i have created a trigger covering the desired area, when player enters it should create a roadcone at a marker in the centre:

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

Trigger set up:

activation BLUFOR, repeat.

Con: This

Activation: [M1] exec "conespawn.sqs"

Conespawn.sqs:

_marker=_this select 0

_cone = "roadcone" createVehicle getmarkerpos "_marker"

nul = [_cone, 200, 200, [[Resistance, [], [], [], [], [1,2], []]]] execVM "coop_essential\cep_zone.sqf"

However this does not seem to work at all, it also doesn't show up any errors either? But if i replace the _Marker with just M1 (the name of my marker) it works perfectly? How ever i want to be able to set what markers name is within the trigger so i can have multiple markers and triggers for different areas?

So any help most appreciated!

Share this post


Link to post
Share on other sites
using "coop essentials" package i'm trying to set up a simple trigger system to allow units (in my case zombies) to spawn every time players enter the area, instead of just one off spawn as "coop essentials" currently does.

Now in theory this should be simple, using an object (a roadcone) with an attach init to activate coop essentials will spawn the desired units and delete the object, thus meaning no more spawns when player unit enters the same area again.

To get around this i have created a trigger covering the desired area, when player enters it should create a roadcone at a marker in the centre:

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

Trigger set up:

activation BLUFOR, repeat.

Con: This

Activation: [M1] exec "conespawn.sqs"

Conespawn.sqs:

_marker=_this select 0

_cone = "roadcone" createVehicle getmarkerpos "_marker"

nul = [_cone, 200, 200, [[Resistance, [], [], [], [], [1,2], []]]] execVM "coop_essential\cep_zone.sqf"

However this does not seem to work at all, it also doesn't show up any errors either? But if i replace the _Marker with just M1 (the name of my marker) it works perfectly? How ever i want to be able to set what markers name is within the trigger so i can have multiple markers and triggers for different areas?

So any help most appreciated!

The "_marker" in the getmarkerpos is taken literally, i.e. a marker called "_marker" is looked for.

Try using the following (I'm unable to test this currently):<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Trigger set up:

activation BLUFOR, repeat.

Con: This

Activation: ["M1"] exec "conespawn.sqs"

Conespawn.sqs:

_marker=_this select 0

_cone = "roadcone" createVehicle getmarkerpos _marker

nul = [_cone, 200, 200, [[Resistance, [], [], [], [], [1,2], []]]] execVM "coop_essential\cep_zone.sqf"

Share this post


Link to post
Share on other sites

Thanks for the reply, just tested it and same problem thou unfortunately confused_o.gif

Edit:

Ok got it working now, found out what was wrong it was the activation in the trigger it should of been ["m1"] exec "conespawn.sqs" instead of just [m1] without the " ".

Thanks again!

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  

×