Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Modifier Triggers to Script

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
Heroes084
Meatbag
Posts: 5
Joined: Sat Dec 17, 2016 10:30 pm
SFD Account: Heroes

Modifier Triggers to Script

Post by Heroes084 » Thu Nov 09, 2017 3:40 pm

I need a help on making a player get some modifiers when activating something, like the player does more melee damage when pressing a button, so... if someone could help me on this, Thx :D
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Fri Nov 10, 2017 6:05 pm

Heroes084 wrote:
Thu Nov 09, 2017 3:40 pm
I need a help on making a player get some modifiers when activating something, like the player does more melee damage when pressing a button, so... if someone could help me on this, Thx :D
Do you need other kind of profile triggering apart from the button press? like AreaTriggers for example?
Then, you need that only players can get effects from a modifier or also bots?
Lastly only the one that activates the trigger will be affected by the modifier?
0 x

Heroes084
Meatbag
Posts: 5
Joined: Sat Dec 17, 2016 10:30 pm
SFD Account: Heroes

Post by Heroes084 » Sat Nov 11, 2017 3:40 am

JakSparro98 wrote:
Fri Nov 10, 2017 6:05 pm
Heroes084 wrote:
Thu Nov 09, 2017 3:40 pm
I need a help on making a player get some modifiers when activating something, like the player does more melee damage when pressing a button, so... if someone could help me on this, Thx :D
Do you need other kind of profile triggering apart from the button press? like AreaTriggers for example?
Then, you need that only players can get effects from a modifier or also bots?
Lastly only the one that activates the trigger will be affected by the modifier?
yeah a need something like that, so i could make some scripts that make specific players have specifed modifiers
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Sat Nov 11, 2017 10:20 pm

Heroes084 wrote:
Sat Nov 11, 2017 3:40 am
JakSparro98 wrote:
Fri Nov 10, 2017 6:05 pm
Heroes084 wrote:
Thu Nov 09, 2017 3:40 pm
I need a help on making a player get some modifiers when activating something, like the player does more melee damage when pressing a button, so... if someone could help me on this, Thx :D
Do you need other kind of profile triggering apart from the button press? like AreaTriggers for example?
Then, you need that only players can get effects from a modifier or also bots?
Lastly only the one that activates the trigger will be affected by the modifier?
yeah a need something like that, so i could make some scripts that make specific players have specifed modifiers
With this the player that activates the button, or passes through the trigger will inherit the modifiers.
Keep in mind that if you use multiple modifiers on the same player, the previous modifiers are not cleared if in the new triggered modifier there isn't a default flag (-2 instead of -1), so if you trigger a modifier that gives you more max health and then you trigger another that gives you more sprint speed, the max health is kept unless in the last triggered one there is a -2 in the max health field.

Here the script and map example of how to use the script along with triggers.
0 x

Post Reply