PDA

Ver la versión completa : Posible solucion a los Waypoints del DAC oO'



Artur
29/09/2016, 09:48
Buenas,

Buscando por ahí, he encontrado este artículo en un foro, puede ser que sea la solución a nuestros problemas ^^


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.



Extraído desde https://forums.bistudio.com/topic/188942-unable-to-give-game-logics-waypoints/

Maur
29/09/2016, 16:11
No estoy enterado de que estas haciendo pero, ¿vas a meter el "group this copyWaypoints group misWaypoints;" como evento de DAC en el primer array de "_Init_Unit_S" para que copie y ejecute los WP después de ser creado? ¿O como?

Artur
29/09/2016, 16:49
Estamos hablando de las lógicas. Por lo que yo entiendo, creas una unidad "invisible" con los güeypoints que quieras, lueogo creas la lógica y le metes en el init la copia de los güeypoints (GL = Game logic).

Artur
13/10/2016, 12:47
Probado y funciona perfectamente!

Volvemos a tener waypoints!!!

Victor Arias
13/10/2016, 12:59
OUUUUU yeahhh