Toribash
I have a simple question to solve hopefully.
Toribash isn't showing the exact score displayed on the scoreboard with the get_player_info().injury function.
Here's the code.

function winning()
Player1score = get_player_info(1).injury
Player2score = get_player_info(0).injury
Player1w = Player1score - Player2score
Player2w = Player2score - Player1score
if(Player1score > Player2score) then
    return "Player 1 is winning by " .. Player1w .. " points."
elseif(Player2score > Player1score) then
    return "Player 2 is winning by " .. Player2w .. " points."
else
    return "Both players have equal scores!"
    end
end

echo(winning())
The scores were 7725, and 0.
And it spit out this...
Don't mind the both player scores are equal part. Its just the part with the very.. unrounded number.

Scores are stored as floats.
You can use math.floor or math.ceil to round it down (floor) or up (ceil) or even use a custom round function

edit: Too late :<
:D
how I know if im playing in multiplayer, and if im playing how I know if im uke or tori.

And when I asked for a timer, I really need a waiter (or however its called) that "waits" one second, no a timer that do something every one second.
Last edited by MC; Jul 21, 2009 at 08:21 AM.
#1 That will get you banned.
#2 That will get you banned.
#3 Why would you need a timer for that?
#4 That will get you banned.
:D
Okay I need to learn how to:

1) When the script loads, I want it to say "Press "L" for Bullet Time"
2) Have my script play a sound when I press and hold "L" and stop playing the sound when I release "L" and also not loop if it has finished playing and I continue to hold "L". Also, if I decide to press "L" again, I expect it to play again the same way.
More Complicated: Maybe get the players speed and depending on the speed, a different sound (sounding slower or faster, relatively) is played in the same way as stated above (3 sounds to choose from; slow, medium, fast).
3) Have my script Rotate the camera to pan around the players when I press and hold "L" and stop rotating the camera when I release "L".
4) Have my script, on holding the button "L" play 1 matchframe at normal speed (about 0.02 seconds) and then the next matchframe and all proceeding matchframes play slower, (x1.033). Where, on the release of button "L", the matchframes begin playing again at normal 0.02 second intervals.

I know it's a lot of question, you might as well make the script and put your own name on it.. but I seriously don't program so I don't know how to do this without assistance.

Any help would be appreciated, thanks.

Edit: I made a sma PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPP <- yeah
I made a small macro that kind of imitates MF slowing down (by holding down shift, pressing "p" with a small gradually increasing delay 53 times, and then releasing shift) and it's kind of hard to time properly... I mean, the effect is pretty good but you have to stop the replay with "p" exactly 53 frames away from the decap, press "l" (which does the macro) and then press "p" again to unpause.. idk.. it looks decent but it's not exactly what I had in mind.. because what if you want to show 2 hits that are within 53 frames of each other? anyways I don't know what you could do to get around that...... unless you made a script that could be adjusted for each individual replay, so you load the script, it loads the replay, and the replay plays perfectly with bullet time effect... but then your script folder would load up with bullet time replay scripts @_@ anyways it was a fun idea but I don't think it's practical.
Last edited by DoubleDagR; Jul 23, 2009 at 05:57 AM.
/set gr 0 0 -30
IS there a way to make a lua script, that will make Uke do what you did to Uke in a replay.

Let's say You tried to kick uke in a replay. So what i want to do is to make Uke do what i did to him in a replay. Is it possible to do that in a lua script?

Sorry if this confuses you