Creating a unit for the owner of another unit.

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
So I have this trigger and ive tried 3 things. I need a trigger that every 15 seconds of the game if a type of unit is in a region create a type of unit for the owerner of the first unit. I've tried:

Red1
Events
Time - Every 15.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Random unit from (Units in Red1 <gen>))) Equal to Bear
Then - Actions
Unit - Create 1 Bear for (Owner of (Triggering unit)) at (Center of Red <gen>) facing Default building facing degrees
Else - Actions
Do nothing

Didn't create any units.

Red1
Events
Time - Every 15.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Random unit from (Units in Red1 <gen>))) Equal to Bear
Then - Actions
Unit - Create 1 Bear for (Matching Unit) at (Center of Red <gen>) facing Default building facing degrees
Else - Actions
Do nothing

Did'nt make any units. Then I did it just to create it for player 1(red) so I know that that is the part I messed up. What do I use to do this?
 
(Unit-type of (Random unit from (Units in Red1 <gen>))) Equal to Bear


the random part shouldn't be random...it should be any unit from units in Red1 <gen> :D

hoped that helped..

might not be right but try it out and tell me if it worked
 
> matching unit is only for triggers using "unit" events

"matching unit" is for "pick every unit in ... matching <some test with 'matching unit'"
 
I'd try a condition like this:
Code:
((Units in <Region> matching ((Unit-type of (Matching unit)) Equal to <some unit here>)) is empty) Equal to False
 
I dont see were to get units in region, all I can find is random units from unit group, units in region.
And how do i get two equal to's.
 
I used:

New condition:
Boolean condition
Unit group - Unit group is empty
Units in region matching condition.
The "match" being a "unit-type comparison"
 
wow that confused me.
what do you mean by:
Units in region matching condition.
The "match" being a "unit-type comparison"
 
This is what i think you said to do but it dont get the second part:

Red1
Events
Time - Every 15.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Units in Red1 <gen>) is empty) Equal to False
(Unit-type of (Matching unit)) Equal to Bear
Then - Actions
Unit - Create 1 Bear for (Matching player) at (Center of Red <gen>) facing Default building facing degrees
Else - Actions
Do nothing

Is this waht you ment?
 
Once you have the "unit group is empty", you are given a couple
choices for what exactly the group would be.
One of the functions offered is "units in region matching condition"...
 
I tested it out and that didn't work.(not what you just said the thing before it.)
 
I found units in region but not units in region matching condition. NM found it
 
It didnt work!

Red1
Events
Time - Every 15.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Bear)) is empty) Equal to False
Then - Actions
Unit - Create 1 Bear for (Matching player) at (Center of Red <gen>) facing Default building facing degrees
Else - Actions
Do nothing
 
"Playable map area" might be a bit big...

More importantly though, "matching player" does not exist!


Hm...
After re-reading your first post here, I guess you're actually looking for something like this:

Code:
Events
    Time - Every 15.00 seconds of game time
Conditions
Actions
    Unit Group - Pick every unit in (Units in Region 1 <gen> matching ((Unit-type of (Matching unit)) Equal to Bear)) and do (Actions)
        Loop - Actions
            Unit - Create 1 <unit> for (Owner of (Picked unit)) at (Random point in Region 2 <gen>) facing Default building facing degrees

Which does:
For every "Bear" in some region, its owner gets a unit somewhere.
 
yes that is what i want, but were do you find: Unit Group - Pick every unit in (Units in Region 1 <gen> matching ((Unit-type of (Matching unit)) Equal to Bear)) and do (Actions)

All I can get is: Pick every unit in (Units in Region 1 <gen>) and do (Actions)

NM I got It
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top