Combining firearms and melee weapons in one map w/o bugs.

Tutorials and guides for Plazma Burst and community features.

Combining firearms and melee weapons in one map w/o bugs.

Postby xElijah » 11 October 2020, 17:42

This is not actually a tutorial. More like a tip. You should know how to make basic custom melee weapon before reading further.

If you played namer720-bunker you might have noticed that when someone is using a knife some strange blinks appear on nearby walls. Those are invisible bullets (projectile model: 15) hitting the wall. Screenshot. To fix this bug you need to make a few changes to the trigger system you used to create melee weapon.

I'll separate triggers by groups to explain:
1) Group 1: triggers that change invisible gun's stats and decoration size.
2) Group 2: trigger that forces decoration to follow invisible gun.
3) Group 3: action on shoot triggers (they make arm offset and change bullet max life).

To fix the bug that appears in namer720-bunker, make following changes:
1) Group 1: gun should spawn 0 projectiles instead of 1.
2) Group 3: add player-specific trigger actions that would change bullet max life to 0 and set gun's projectile count to 1.

*Player-specific action is a trigger action that executes only for player who activates the trigger, but not for anyone else.
*To create player-specific actions, add this before initiating them:

>Set value of variable A to player-initaitor slot
A: (variableA)
B:

>Set value of variable A to slot of current player
A: (variableB)
B:

>Continue trigger actions execution only if variable A equals variable B
A: (variableA)
B: (variableB)

After you set those actions above, you can start changing bullet max life to 0 and setting gun's projectile count to 1. Don't forget to change bullet max life back to 30 and projectile count to 0 with a timer. If you want to see how it works I have added it to my test map. Link.
User avatar
xElijah
Usurpation Soldier [50]
 
Posts: 96
Joined: 3 October 2020, 15:43

Re: Combining firearms and melee weapons in one map w/o bugs

Postby darkstar 1 » 15 November 2020, 16:08

Does the bullet life melee system ever fail when a laggy person uses it? I like the idea, but what if lag skips the bullet life trigger action and shoots at full range anyway?



User avatar
darkstar 1
Proxy [700]
 
Posts: 712
Joined: 13 September 2014, 13:20
Location: Here... or there :|

Re: Combining firearms and melee weapons in one map w/o bugs

Postby xElijah » 15 November 2020, 16:52

darkstar 1 wrote:Does the bullet life melee system ever fail when a laggy person uses it? I like the idea, but what if lag skips the bullet life trigger action and shoots at full range anyway?

Works fine for me so far. I'm not aware of cases when lag caused one single trigger action to skip itself while others execute normally.
User avatar
xElijah
Usurpation Soldier [50]
 
Posts: 96
Joined: 3 October 2020, 15:43


Return to Tutorials

Who is online

Users browsing this forum: No registered users