Neutralize Units

  • Thread starter Thread starter Toronto
  • Start date Start date
T

Toronto

Guest
Is there a trigger that will make player owned units become neutral when there is no user present?


Example

12 towers are on a map for 12 players. Oh no player 3 is not there but the creater doesn't know how to delete units so he decides to leave the units where they are. Is there a way to make the tower that doesn't have a player become neutral?


_________________________________________________________________
Possible other questions how do you delete units on a map if you can't undo because you saved the map? = (
 
Wouldn't it be simpler to only create the units for players that actually are in the game?


Open the unit palette.
When you select a unit from the list, you can put it on the map, right?
Well, press <space> once. Now you can select units that are already on the map.
A simple "delete" will remove them.
 
Removing units that noone needs:

Code:
RemoveUnused
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching (((Owner of (Matching unit)) slot status) Equal to Is unused)) and do (Actions)
            Loop - Actions
                Unit - Change ownership of (Picked unit) to Neutral Hostile and Change color


Creating units for actual players:

Code:
StartingUnits
    Events
        Map initialization
    Conditions
    Actions
        Set Players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Player Group - Pick every player in Players and do (Actions)
            Loop - Actions
                Unit - Create 1 Footman for (Picked player) at ((Picked player) start location) facing Default building facing degrees

"Players" is a variable of type "Player group".


Getting rid of units once a player is gone:

Code:
PlayerGone
    Events
        Player - Player 1 (Red) leaves the game
        Player - Player 2 (Blue) leaves the game
        Player - Player 3 (Teal) leaves the game
        Player - Player 4 (Purple) leaves the game
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
            Loop - Actions
                Unit - Change ownership of (Picked unit) to Neutral Hostile and Change color
 
JEEZ ur starting unit trigger is so confusing you have liek 2 events on 1 line and words that i cant find where does it say set players??
 
AceHart said:
"Players" is a variable of type "Player group".

That's where.
 
> Set Players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))

Create a variable.
Call it "Players".
Use "player group" as type.

The action is "set variable".
Select your variable.
In the function list, look for "all players matching condition".

For the condition, put "and" as first condition.
It will say "condition1 and condition2".
Then a "player controller" for one and a "player slot status" for the other.



There's also the "simpler" version:

Code:
Player Group - Pick every player in (All players) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Picked player) controller) Equal to User
                ((Picked player) slot status) Equal to Is playing
            Then - Actions
                Player Group - Add (Picked player) to Players
            Else - Actions

That's the same, only much longer...
 
???? MAN I JUST WANT TO MAKE TOWERS FOR PEOPLE THAT ARE IN THE GAME!!!

I have uploaded my map please make the trigger then upload it back for me
 
He's telling you how to do that. And he won't do your map for you any more than he already has.
 
well sargon that didnt help i figured it out anyways... acehart forgot to add the unit create thing to his last code


Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) controller) Equal to User
((Picked player) slot status) Equal to Is playing
Then - Actions
Player Group - Add (Picked player) to (All players)
Unit - Create 1 Cold Tower for (Picked player) at ((Picked player) start location) facing Default building facing degrees
Else - Actions
Do nothing
 
Toronto said:
???? MAN I JUST WANT TO MAKE TOWERS FOR PEOPLE THAT ARE IN THE GAME!!!

I have uploaded my map please make the trigger then upload it back for me
If you can't do this, don't expect to get far.

A good thing is to ask about exactly what you're having trouble with. It's the only way to learn.
 
you wanted them to become neutral and not removed yes? its much simpler than acehart seems to think...
Code:
Neutral Towers
    Events
        Map initialization
        Player - Player 1 (Red) leaves the game
        Player - Player 2 (Blue) leaves the game
        Player - Player 3 (Teal) leaves the game
        Player - Player 4 (Purple) leaves the game
        Player - Player 5 (Yellow) leaves the game
        Player - Player 6 (Orange) leaves the game
        Player - Player 7 (Green) leaves the game
        Player - Player 8 (Pink) leaves the game
        Player - Player 9 (Gray) leaves the game
        Player - Player 10 (Light Blue) leaves the game
        Player - Player 11 (Dark Green) leaves the game
        Player - Player 12 (Brown) leaves the game
    Conditions
    Actions
        Player Group - Pick every player in (All players matching (((Matching player) slot status) Not equal to Is playing)) and do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
                    Loop - Actions
                        Unit - Change ownership of (Picked unit) to Neutral Hostile and Change color
if you dont want the towers to attack anyone then switch neutral hostile to neutral passive.
 
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

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top