Jump to content
slendermang

Unable to give Game Logics waypoints?

Recommended Posts

Is this a bug or intended? In the 2D editor it was possible to do this, as a result I can longer use custom waypoints in DAC.

Share this post


Link to post
Share on other sites

discontiued feature in eden

Are you sure? Is it confirmed by Dev's?  

Share this post


Link to post
Share on other sites

Well, if you read the tutorial (the hat image in the upper right corner) it's said so on the second page of the 'Switching from old 2d editor' section...

Share this post


Link to post
Share on other sites

You can still script them though.

An easy way to enable this while still being able to do it visually in the editor is to...

Place a unit and set him as hidden( editor tick box does not work atm so just use 'hideObjectGlobal this' in his init ) and simulation disabled.

Name him something like myGLWaypoints.

Give him all the waypoints needed including syncing to any triggers etc.

Then in your GL init write..

group this copyWaypoints group myGLWaypoints;
deleteVehicle myGLWaypoints;
Job done, If you want some way to verify this add to each waypoint activation..

_nul = createVehicle [ 'Sign_Arrow_Blue_F', getPos this, [], 0, 'CAN_COLLIDE' ]
A blue arrow will now be created each time the GL jumps to a WP.

To verify synced triggers for WPs are also copied over..

Sync one of the waypoints to a trigger

Set the trigger condition to

!isnil "myVar"
Add an action to the player..

player addaction ["Do",{myVar = true}]
When your preview the mission you will see blue arrow at each WP the GL jumps to until it reaches the one synced to the trigger.

On using the action "Do" you will see the rest of the arrow as the GL continues its WPs.

You can easily expand this to copy WPs positions and replace them with AND/ORs if needed.

  • Like 1

Share this post


Link to post
Share on other sites

sorry to bump an old thread but I found thi swhilst searching for some solutions for DAC since Eden.

 

My question is:

 

Is it possible to create waypoint from script (addWaypoint) and assign it to the GameLogic like that? Or must the waypoint first belong to a unit and then be copied to the GameLogic?

 

The script im writing is to initialise a DAC zone on the fly and it would be excellent if i could say create a game logic to use as the fixed point for the respawn camp, then give it a waypoint, then after all of that init a DAC zone over the top of it and let Silola's genius handle the rest :P

Share this post


Link to post
Share on other sites

Yes it is possible to assign waypoints to GLs via script as you suggest.

The only thing you have to look out for is that all plain GLs are grouped together by the game.

For instance if you place two GLs and name them gl1 and gl2 then preview the mission and in the debug console type

units group gl1
you will see that both GLs are in the same group.

As adding a waypoint is done to the group adding any waypoints will effect both of these GLs.

If this is not desired then you can counteract this by placing in the GLs initBox

[ this ] join createGroup sideLogic
making it create its own group at mission initialisation.

You can then add waypoints in script safely knowing that you are only adding the waypoint to this particular GL and not a group of GLs.

  • Like 1

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

×