My village idiot =/

WastedSavior

A day without sunshine is like, well, night.
Reaction score
213
Okay, I have a prob, I have a trigger, that spawns villagers this -


Villager 2
Events
Time - Every 50.00 seconds of game time
Conditions
Actions
Unit - Create 5 Villager (Male) for Player 10 (Light Blue) at (Random point in Rect 001 <gen>) facing (Random angle) degrees


It works like a CHARM! but they started building up.. so i added this trigger

Limit Copy
Events
Conditions
(Number of units in (Units in Rect 001 <gen>)) Equal to 10
Actions
Unit - Remove (Last created unit) from the game
Unit - Remove (Last created unit) from the game
Unit - Remove (Last created unit) from the game
Unit - Remove (Last created unit) from the game
Unit - Remove (Last created unit) from the game

Is there something wrong with my second trigger? cuz it doesn't seem to be doing its job... :(
 
Yes, your trigger has no event and therefore it never runs.

Make it a Periodic Event (under time) that also runs every 50 seconds...

...or better yet take your condition from the 2nd trigger and put it in your first trigger and do away with the 2nd trigger all together.

Also I would change the test to greater than or equal to 10 instead of just equal to.

ThySpektre
 
if i change it to greater than or equal to, do i only have to do one "remove last placed unit" ? or still all 5 of them on same trigger?
 
(Last created unit) is one unit, removing it 5 times does nothing. ike he said, add a condition to the first trigger
Number of units in (spawn region) less than 10
 
His thing is all and well, but they still are building up.. it goes from 5.. to 10.. to 14..
 
Anyways, if i combine remove, and spawn, Then it'll need 10 units before it'll start spawning villagers.. kinda a contridiction no?

Limit
Events
Time - Every 50.00 seconds of game time
Conditions
(Number of units in (Units in Rect 001 <gen>)) Greater than or equal to 10
Actions
Unit - Remove (Last created unit) from the game


Villager
Events
Time - Every 50.00 seconds of game time
Conditions
Actions
Unit - Create 1 Villager (Male) for Player 10 (Light Blue) at (Random point in Rect 001 <gen>) facing (Random angle) degrees

is what i have right now.. i have 5 diff villager spawns, so there more random in the rect, then i have the Limit..
 
What triggers do you have now? and don't double post, edit them.
 
You need to use If/Then/Else to detect if you want villegers to spawn, "Last Created Unit" isn't particarly reliable anyway becuase it would destroy any unit last made, it would need to be in the trigger with the made unit and no wait in between for it to be usefull.

EDIT: Il'd do it like this in bold means its a vaule you change, i knocked out the leak otherwise you have 5 point leaks everytime it spawns units.

You need

TempPoint - Point Array Size <however many villgers you want to spawn every 5 seconds
TempPointIndex - Integer

but "Integer A 1 - 5" things need to have the same end vaule

Code:
Untitled Trigger 001
    Events
        Time - Every [B]5.00[/B] seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in ([B]Playable map area[/B]))) Less than or equal to [B]10[/B]
            Then - Actions
                For each (Integer A) from 1 to [B]5[/B], do (Actions)
                    Loop - Actions
                        Set TempPoint[TempPointIndex] = (Random point in ([B]Playable map area[/B]))
                        Unit - Create 1 [B]Villager[/B] (Male 2) for [B]Player 1 (Red)[/B] at TempPoint[TempPointIndex] facing ([B]Random angle[/B]) degrees
                        Set TempPointIndex = (TempPointIndex + 1)
                Set TempPointIndex = 0
                For each (Integer A) from 1 to [B]5[/B], do (Actions)
                    Loop - Actions
                        Custom script:   call RemoveLocation( udg_TempPoint[udg_TempPointIndex] )
                        Set TempPointIndex = (TempPointIndex + 1)
            Else - Actions
                Do nothing
 
Why are you using arrays and custom script? just have 1 variable, TempPoint, and in one loop set it, then spawn the unit at the point. No leaks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top