Need advice on player character that drops weapon

Aerisetta

Active member
I'm making a character that will drop his weapon if he falls. Im looking for some advice on how to structure it

HERO - player with sword
HERO_MELEE - player without sword (this is a weapon character)

Spawn as player (holding the sword)
If player is hit without fall, continue as HERO
If player is hit and falls
- player equips weapon HERO_MELEE
- player spawns item SWORD
- player is now HERO_MELEE

If player goes to SWORD item and picks it up, he becomes HERO again

Do you think this is a good setup?

How do i switch from HERO to MELEE? Using a script? Use during fall animation?
 
I'm making a character that will drop his weapon if he falls. Im looking for some advice on how to structure it

HERO - player with sword
HERO_MELEE - player without sword (this is a weapon character)

Spawn as player (holding the sword)
If player is hit without fall, continue as HERO
If player is hit and falls
- player equips weapon HERO_MELEE
- player spawns item SWORD
- player is now HERO_MELEE

If player goes to SWORD item and picks it up, he becomes HERO again

Do you think this is a good setup?

How do i switch from HERO to MELEE? Using a script? Use during fall animation?

This is how I did it. Note I did use the new entity property script functions. Those aren't avialble in stable release yet, but I only used them so I could test them as I worked. The legacy entity property can do this without any issues and the process is identical.

 
setweap {int}

  • Sets starting weapon in this level for players based on weapon’s number.
  • Weapon number is based on ‘weapnum’ in weapon’s text (see Entity Files: Header Data above).
  • Make sure the weapon is available before setting this.

*edit
wait this is mugen page 😅
 
setweap {int}

  • Sets starting weapon in this level for players based on weapon’s number.
  • Weapon number is based on ‘weapnum’ in weapon’s text (see Entity Files: Header Data above).
  • Make sure the weapon is available before setting this.

*edit
wait this is mugen page 😅
oh crap i posted in mugen page again sorry
 
NP, I just moved it. Also, setweap is not sufficient for this @machok. To make it nice and stable, you need to have it self contained to the model. Again, I wrote out the full procedure, script included. It's all in the overview.

DC
 
Back
Top Bottom