Frogger like trigger... Help?

T]i[T]a[N

New Member
Reaction score
0
Okay I'm in the process of making a maze, I have a frogger like trigger, which basically does the same exact thing the first level of Maze Legends #1 escept for a minor bug I can't seem to fix...

The bug is the random spawn I have set sometimes spawns 2 or three units in the same region at once "randomly." I need to fix this.

Here is the INIT trigger.

Code:
FINAL OBSTICLE
    Events
        Time - Elapsed game time is 0.50 seconds
    Conditions
    Actions
        Set RandomRegion[1] = Random 1 <gen>
        Set RandomRegion[2] = Random 4 <gen>
        Set RandomRegion[3] = Random 2 <gen>
        Set RandomRegion[4] = Random 3 <gen>
        Set RandomRegion[5] = Random 5 <gen>
        Set RandomRegion[6] = Random 6 <gen>
        Set RandomRegion[7] = Random 7 <gen>
        Set RandomRegion[8] = Random 8 <gen>
        Set RandomRegion[9] = Random 9 <gen>
        Set RandomRegion[10] = Random 10 <gen>
        Set RandomRegion[11] = Random 11 <gen>
        Set RandomRegion[12] = Random 12 <gen>
        Set RandomRegion[13] = Random 13 <gen>
        Set RandomRegion[14] = Random 14 <gen>
        Set RandomRegion[15] = Random 15 <gen>

The actual creation trigger.

Code:
FINAL OBSTICLE spawn
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit - Create 1 |c00BFBFBFTiTaNiOuS MiNiOn|r for Player 11 (Dark Green) at (Center of RandomRegion[(Random integer number between 1 and 16)]) facing Default building facing degrees

I had that set three times.


The movement.

Code:
FINAL OBSTICLE move
    Events
        Unit - A unit enters Random 1 <gen>
    Conditions
    Actions
        Unit - Order (Entering unit) to Move To (Center of Remove 1 <gen>)

Had that set 15 times (one for each region)

The Remove.

Code:
FINAL OBSTICLE remove
    Events
        Unit - A unit enters Remove 1 <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to |c00BFBFBFTiTaNiOuS MiNiOn|r
    Actions
        Unit - Remove (Triggering unit) from the game

and I had that set 15 times also (one for each region)

Can anyone help me?
 
S

Sunny_D

Guest
what about: (as you said you have this trigger 3 times, you could combine it, i thought...)

Code:
FINAL OBSTICLE spawn
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit - Create 1 |c00BFBFBFTiTaNiOuS MiNiOn|r for Player 11 (Dark Green) at (Center of RandomRegion[(Random integer number between [B]1 and 5[/B])]) facing Default building facing degrees
        Unit - Create 1 |c00BFBFBFTiTaNiOuS MiNiOn|r for Player 11 (Dark Green) at (Center of RandomRegion[(Random integer number between [B]6 and 10[/B])]) facing Default building facing degrees
        Unit - Create 1 |c00BFBFBFTiTaNiOuS MiNiOn|r for Player 11 (Dark Green) at (Center of RandomRegion[(Random integer number between [B]11 and 16[/B])]) facing Default building facing degrees

and btw, you can include more than one event in one trigger as well, for example:

Code:
FINAL OBSTICLE remove
    Events
        Unit - A unit enters Remove 1 <gen>
        Unit - A unit enters Remove 2 <gen>
        Unit - A unit enters Remove 3 <gen>
        etc....
    Conditions
        (Unit-type of (Triggering unit)) Equal to |c00BFBFBFTiTaNiOuS MiNiOn|r
    Actions
        Unit - Remove (Triggering unit) from the game

this would fire the trigger each time a unit enters one of them...
 
S

Sunny_D

Guest
yes?? i thought i did... or you meant something other?

The bug is the random spawn I have set sometimes spawns 2 or three units in the same region at once "randomly." I need to fix this.

i assumed with that that you dont want in this trigger:

Code:
FINAL OBSTICLE spawn
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit - Create 1 |c00BFBFBFTiTaNiOuS MiNiOn|r for Player 11 (Dark Green) at (Center of RandomRegion[(Random integer number between 1 and 16)]) facing Default building facing degrees

wanted to spawn 3 Minions in random areas, but not more than 1 in the same area.

that could be solved with combining the 3 triggers like the one i showed above....

sry, if i dont get your problem...
 
M

Mythic Fr0st

Guest
hmm

I get it, there appears to be no bug, with this trigger to me, check if any others could... or any triggers that might "run" your creation trigger
 

T]i[T]a[N

New Member
Reaction score
0
well I was thinking about the trigger today and figured out how to fix it XD thanks for trying though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top