• 0

    posted a message on Unit scoring help.

    That didn't work. Here is the lava code..

    Kill Units in lava
        Events
            Timer - Every 0.5 seconds of Game Time
        Local Variables
        Conditions
            Lava Death? == True
        Actions
            Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            ((Picked unit) uses Fly mover) == False
                            ((Picked unit) uses FlyLow (Unknown) mover) == False
                        Then
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    (Ground height at (Position of (Picked unit))) <= 5.15
                                Then
                                    Unit - Add 1 Lava Damage to (Picked unit) from player 15
                                Else
                        Else
    

    It kills units by using a data entry.

    Posted in: Triggers
  • 0

    posted a message on Unit scoring help.

    First off, not sure if this is the right forum (I'm new, looked around, decided this looked like the best place for the question) I'm building a map, with a player score (or kill counter) when player kills other teams units, the problem is the map also has lava that raises and lowers, when someone puts their own units into the lava it raises their score. I know it has something to do with the way I wrote out the code, but not sure what to change it to.

    I'll give out one of the players as they are all written the same:

    Modify Kills Player 1
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            (Owner of (Killing unit)) == 1
        Actions
            Variable - Modify Kills Player 1: + 1
            Leaderboard - Set Kills Leaderboard item text at column 2 and row 1 to (Text(Kills Player 1))
    

    This is the leader board in case needed:

    Create Leaderboard
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Leaderboard - Create a leaderboard with 2 columns and 6 rows, with the name "", and using (100%, 100%, 100%) color.
            Variable - Set Kills Leaderboard = (Last created leaderboard)
            Leaderboard - Enable Show Header state for Kills Leaderboard for (All players)
            Leaderboard - Disable Show Title state for Kills Leaderboard for (All players)
            Leaderboard - Set Kills Leaderboard item text at column 1 and row 1 to "Player 1"
            Leaderboard - Set Kills Leaderboard item text at column 2 and row 1 to (Text(Kills Player 1))
            Leaderboard - Set Kills Leaderboard item text at column 1 and row 2 to "Player 2"
            Leaderboard - Set Kills Leaderboard item text at column 2 and row 2 to (Text(Kills Player 2))
            Leaderboard - Set Kills Leaderboard item text at column 1 and row 3 to "Player 3"
            Leaderboard - Set Kills Leaderboard item text at column 2 and row 3 to (Text(Kills Player 3))
            Leaderboard - Set Kills Leaderboard item text at column 1 and row 4 to "Player 4"
            Leaderboard - Set Kills Leaderboard item text at column 2 and row 4 to (Text(Kills Player 4))
            Leaderboard - Set Kills Leaderboard item text at column 1 and row 5 to "Player 5"
            Leaderboard - Set Kills Leaderboard item text at column 2 and row 5 to (Text(Kills Player 5))
            Leaderboard - Set Kills Leaderboard item text at column 1 and row 6 to "Player 6"
            Leaderboard - Set Kills Leaderboard item text at column 2 and row 6 to (Text(Kills Player 6))
            Leaderboard - Set Kills Leaderboard item text at column 1 and row Header to "Kills"
            Leaderboard - Hide Kills Leaderboard minimize button for (All players)
    

    Any help would greatly be appreciated.

    Posted in: Triggers
  • To post a comment, please or register a new account.