This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
Script Commission
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- Duck
- Superfighter

- Posts: 77
- Joined: Tue Mar 22, 2016 2:35 am
- Title: gogogadgetkeyboard
- SFD Account: Shui
- Started SFD: Jul 2013
- Location: ->
- Gender:
- Contact:
Script Commission
Tile type: Area Trigger
On enter method: gives a player 10-25 damage (randomly)
On leave method: multiplies the velocity forces acting on a player by 0.75% (if that's even possible)
For the on leave method I essentially wanted the players to get knocked around further and harder. I know stunning players isn't possible right now, but I was hoping that when leaving the trigger the players would temporarily suffer way worse from a fall (if they did fall).
0 x
'<'
- gwendalaze
- Superfighter

- Posts: 84
- Joined: Sat Mar 19, 2016 12:55 pm
- Title: Jarate Yellow Belt
- Started SFD: PreAlpha 1.1.4
- Location: France
Code: Select all
Random rnd = new Random();
public void onEnter(TriggerArgs args){
if (args.Sender is IPlayer){
IPlayer ply = (IPlayer)args.Sender;
ply.SetHealth(ply.GetHealth() - rnd.Next(10,26));
if (ply.GetHealth() <= 0F) ply.Kill();
}
}
public void onExit(TriggerArgs args){
if (args.Sender is IPlayer){
IObject ply = (IObject)args.Sender;
ply.SetLinearVelocity(Vector2.Multiply(ply.GetLinearVelocity(),0.75f));
}
}
edit : just noticed text formating wont work in a code
1 x
- Gwendalaze, failing at being fun, just like this signature