Kills less or equal to 200 trouble

  • Thread starter Thread starter Jabos
  • Start date Start date
J

Jabos

Guest
Even if I know how to use triggers I have vague knowledge of Variables so my question is:

I got a leaderboard and a upgrade trigger that uses the same variable, for the leaderboard I use

"Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)" (when something is killed)

Then I use "Kills[(Player number of (Owner of (Killing unit)))] Less than or equal to 200" (Because I had no idea what to put in index)

That's when I got problems, the Leaderboard won't show anymore (Never checked upgrade one since I haven't been able to test that part yet) so is it that index is the same that's making problems or is it something else?
 
thats because when you make the leaderboard with a var, i doesnt work for me either, you have to make the players with the value 0 and then change the value for the player to the var.
 
That's what I've done :) I create the leaderboard in one trigger then it updates with another and it worked before (Before it broke down and I had to redo the map) I even used http://www.world-editor-tutorials.thehelper.net/leaderboard.php when I did it :)

EDIT - Ran into another problem, I have visibility over a area but when the unit leaves I want the visibility to go away (for that player only). How can I do that? :confused:
 
1. Try this: (This is one i used in my map)

Code:
Team Dialog
    Events
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled Players           -...
        Set Team_LB = (Last created leaderboard)
        Player Group - Pick every player in (All players) and do (Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0)
        Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Number_Of_Kills[(Player number of Player 1 (Red))]
        Leaderboard - Change the value for Player 2 (Blue) in (Last created leaderboard) to Number_Of_Kills[(Player number of Player 2 (Blue))]
        Leaderboard - Change the value for Player 3 (Teal) in (Last created leaderboard) to Number_Of_Kills[(Player number of Player 3 (Teal))]
        Leaderboard - Change the value for Player 4 (Purple) in (Last created leaderboard) to Number_Of_Kills[(Player number of Player 4 (Purple))]
        Leaderboard - Change the value for Player 5 (Yellow) in (Last created leaderboard) to Number_Of_Kills[(Player number of Player 5 (Yellow))]
        Leaderboard - Change the value for Player 6 (Orange) in (Last created leaderboard) to Number_Of_Kills[(Player number of Player 6 (Orange))]
        Leaderboard - Change the value for Player 7 (Green) in (Last created leaderboard) to Number_Of_Kills[(Player number of Player 7 (Green))]
        Leaderboard - Change the label for Player 12 (Brown) in (Last created leaderboard) to Terrorists Remainin...
        Leaderboard - Change the value for Player 12 (Brown) in (Last created leaderboard) to Remaining_Terrorists
        Player Group - Pick every player in (All players) and do (Leaderboard - Change the display style for (Picked player) in (Last created leaderboard) to Show the label, Show the value, and Hide the icon)
        Leaderboard - Show (Last created leaderboard)
If you wanted to reduce the triggers, try using the (integer a) command.


2. Try use the visibility at the end of the triggers list. It should look something like this:
Code:
 Visibility - Create an initially Disabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
You may need to use a lot of regions, for it though.
 
Got the leaderboard to work now, but the only way to disable a visibility is using last created visibility, wont that make let's say purple's visibility go away instead of red's? (If purple comes last)
 
Just an idea, and I'm not sure of any "leaking" consequences if you're concerned with that, but...

What you could do is create variable of a visibility modifier region. When the player enters the region, enable it. When the player leaves the region, disable it. To get it initialized as a value, have it set to the "last created visibility modifier" or whatever, and create those modifiers at the start of the game so that each variable gets set properly. Whenever in distress, look at the variables, or so I've usually found.

Try that out. It might work.
 
Jabos said:
Got the leaderboard to work now, but the only way to disable a visibility is using last created visibility, wont that make let's say purple's visibility go away instead of red's? (If purple comes last)
Yes, this is another place to use a variable. You would use a variable of type Visibility Modifier and make it an array. The easiest way to create them is like this:
Code:
For every (Integer A) from 1 to [[I]however many players[/I]] do (Actions)
    Loop - (Actions)
        Visibility - Create an initially Enabled visibility modifier for (Player (Integer A)) emitting visibility across (Playable Map Area)
        Set VisibilityModifiers[(Integer A)] = (Last Created Visibility Modifier)
And then you can disable them with the player number:
Code:
Visibility - Disable VisibilityModifiers[[I]player number[/I]]
 
the Lumpy said:
Yes, this is another place to use a variable. You would use a variable of type Visibility Modifier and make it an array. The easiest way to create them is like this:
Code:
For every (Integer A) from 1 to [[I]however many players[/I]] do (Actions)
    Loop - (Actions)
        Visibility - Create an initially Enabled visibility modifier for (Player (Integer A)) emitting visibility across (Playable Map Area)
        Set VisibilityModifiers[(Integer A)] = (Last Created Visibility Modifier)
And then you can disable them with the player number:
Code:
Visibility - Disable VisibilityModifiers[[I]player number[/I]]

That seems to be able to work but where do I find [player number] all I can find is "Player number of player (1)"
 
I put it in italics because I really meant "Insert the number of the player who's visibility modifier you wish to disable here".
 
I knew THAT but I didn't know what value I was supposed to put there because I can find no Integer A in the list from Player Number...
 
Once again, not sure about leaks (they're so vague and hidden--can't see a dang thing the destructor or constructor does in scripting, bleh), but why not use a player group? That way, you can just iterate through the player group that you created as a variable in the editor and stored all of the players in at the start of the game. Now, iterating through it only needs the "Picked Player" reference to the player in that player group.

I guess it is pretty much the same thing, except using player groups and Picked Players instead. Here it is.

Code:
Player Group - Pick every player in ThePlayers and do (Actions)
    Loop - Actions
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility from (Center of (Region X)) to a radius of 512.00
        Set visMod[(Player number of (Picked player))] = (Last created visibility modifier)

That should work for the initialization of the visibility modifiers stored in the visMod array of type visibility modifier. For visibility to be disabled, then using something like this trigger for player one should work:

Code:
DisableVision1
    Events
        Unit - A unit leaves (Region X)
    Conditions
        (Unit-type of (Leaving unit)) Equal to Footman
        (Owner of (Leaving unit)) Equal to Player 1 (Red)
    Actions
        Visibility - Disable visMod[1]

Visibility reenabled would be the trigger above essentially, except it would enable the visibility modifier instead of disable it. Both of these should work, but neither was tested; sorry if there is a bug in one.
 
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