Integer Madness

Ozzdog

Hopeless Toby Driver fan boy
I am making a soccer game. When the ball enters the net, the person who scored the goal gets a point as well as the team (both shown on the leaderboard). But when i test and score a goal, it gives the player who scored +2 points, as well as the team. Not cool. here are my triggers.

Scoring Trigger.

Code:
Events - Unit - A unit enters South Net <gen>

Conditions - (Entering unit) Equal to Ball 0002 <gen>
(Owner of Kicker) Equal to Player 1 (Red)

Actions - Unit - Move Ball 0002 <gen> instantly to (Center of Outta here <gen>)
Set Score[(Player number of (Owner of Kicker))] = (Score[(Player number of (Owner of Kicker))] + 1)
Set Score[1] = (Score[1] + 1)
Trigger - Run [b]Runnable[/b] <gen> (checking conditions)
here is that Runnable[b/] trigger, that refreshes the leaderboard.
Code:
Events - none

Conditions - none

Actions - Leaderboard - Change the value for Player 1 (Red) in Leader to Score[(Player number of Player 1 (Red))]
Leaderboard - Change the value for Player 2 (Blue) in Leader to Score[(Player number of Player 2 (Blue))]
Leaderboard - Change the value for Player 3 (Teal) in Leader to Score[(Player number of Player 3 (Teal))]
Leaderboard - Change the value for Player 4 (Purple) in Leader to Score[(Player number of Player 4 (Purple))]
Leaderboard - Change the value for Player 5 (Yellow) in Leader to Score[(Player number of Player 5 (Yellow))]
Leaderboard - Change the value for Player 6 (Orange) in Leader to Score[(Player number of Player 6 (Orange))]
Leaderboard - Change the value for Player 8 (Pink) in Leader to Score[1]
Leaderboard - Change the value for Player 9 (Gray) in Leader to Score[2]
Leaderboard - Change the color of the label for Player 8 (Pink) in Leader to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Leaderboard - Change the color of the label for Player 9 (Gray) in Leader to (0.00%, 0.00%, 100.00%) with 0.00% transparency
Leaderboard - Change the color of the value for Player 8 (Pink) in Leader to (100.00%, 100.00%, 0.00%) with 0.00% transparency
Leaderboard - Change the color of the value for Player 9 (Gray) in Leader to (100.00%, 0.00%, 0.00%) with 100.00% transparency
looks fine to me, but wc3 disagrees (rhyme)
 
D

Demonspawn21

Guest
Leaderboard - Change the value for Player 8 (Pink) in Leader to Score[1]
Leaderboard - Change the value for Player 9 (Gray) in Leader to Score[2]


You changed the score of player red and blue twice.

And in your first trigger it only allows a score if the kicker is owned by player red which negates the purpose of having subnumbers that use the player number of a player.
 

Ozzdog

Hopeless Toby Driver fan boy
Im sorry that this "bump" is one hour sh of being 24 hours, but this is quite an important part of my map, and id really like to get the basic core functions finished. I do not understand what is wrong! I could psot my map if anyone would liek me to.
 

Sud

"[If life=Dota] I'd have quit long ago" -- Acehart
Appears to be a logic error to me. You will want to rethink how you set the scoring trigger up.

First off, the conditions. Owner of kicker can only ever be player 1. Is this correct? It looks to me that there should be more to it than that, especially if it's a multiplayer soccer game.

Especially since you further allude that the OWNER of kicker should receive the goal. In only one possibility could a point be awarded - when the OWNER is player 1 (red), so, at some level here, it looks like your condition and your actions have different intents.

Now, in the actions, it awards two points:
1 point to the scoring player (owner of kicker)
1 point to player 1 (score[1])

And of course, only player 1 can EVER score.

So there's definitely something amiss there. Maybe if you explain to me how you wish the intended functionality to work I can give you something a little more workable.
 

Ozzdog

Hopeless Toby Driver fan boy
sorry, the "owner of unit is equal to player one is a typo"

this is what it is and still doesnt work.

((Owner of Kicker) is an ally of Player 1 (Red)) Equal to True

  • Ill attach my map, it would be much easier.
 

Sud

"[If life=Dota] I'd have quit long ago" -- Acehart
Not for me, because I'm at work

You aren't by chance using Score[1] as the score for the team would you?

Because if you are Player 1 (Red) and you score a goal, not only will Score[1] receive a point, but Score[Player 1 - Red] will receive an additional point.

If Score[1] is the team score I suggest you move that to somewhere else.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    I have a GIF though
  • tom_mai78101 tom_mai78101:
    In the GIF, I've configured it so the lower the "Main Value" is, the better. I had to compress it pretty far down though.
  • tom_mai78101 tom_mai78101:
    And this is the thread with the video that shows the wall clip. https://tasvideos.org/Forum/Topics/23453
    +2
  • tom_mai78101 tom_mai78101:
    Hmm, about the Headline News, I noticed threads are being moved into the subforum (Health News, Environmental News, etc.). When that happens, the TH Forum Home page loses the articles, and instead would show old articles posted 1 or 2 weeks ago.
  • tom_mai78101 tom_mai78101:
    What do we do with the Home page?
  • Ghan Ghan:
    I added those forums to the filter for that widget.
  • tom_mai78101 tom_mai78101:
    Oh nice. They're back. Thanks.
  • tom_mai78101 tom_mai78101:
    Now I think it makes more sense for me to put news in their own subforums, without worry.
  • The Helper The Helper:
    Awesome Ghan thanks! I was purposely not moving the first 15 news articles in Headline news to the different subforums but I guess I don't have to do that now?
  • tom_mai78101 tom_mai78101:
    Question: Is there a way to remove thread redirects? It creates a copy of the moved thread and takes up space, and I am leaning towards wanting to remove them in the Headline News. But if they have an expiration date, I guess I'm fine with it.
  • The Helper The Helper:
    If you move a thread please leave a permanent redirect. You can delete any redirects after 6 months. The redirects are left to help Search Engines find the moved content.
  • tom_mai78101 tom_mai78101:
    What if you move the permanent redirect, not the thread?
  • The Helper The Helper:
    I think that works but I have not messed with it. You can delete redirects though if you have to that will not delete the original thread
  • The Helper The Helper:
    if a redirect ends up in the same forum as the post it goes to though I think the redirect drops or fails or something but they are not bugged out and when you are working on an indirect the original post is safe.
  • The Helper The Helper:
    Happy Early Friday :)
    +1
  • V-SNES V-SNES:
    Happy Friday :)
  • tom_mai78101 tom_mai78101:
    Fun Friday for me
  • tom_mai78101 tom_mai78101:
    Happy Fun Friday to all.
    +2
  • The Helper The Helper:
    Happy Sunday everyone!!!
  • V-SNES V-SNES:
    Happy Sunday!!!
    +1
  • jonas jonas:
    Happy monday :p
  • jonas jonas:
    Everyone hates mondays?
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • jonas jonas:
    Happy belated tuesday

    Staff online

    • Ghan
      Administrator - Servers are fun

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top