Solved Weapon related quick questions

Question that is answered or resolved.

Die_In_Fire

Well-known member
I have 2 small questions:

1. I want to spawn an enemy with a weapon on a level. Normally the enemy is weaponless but able to catch different weapons, and what I do is to spawn the weapon and the enemy off screen so he enters the screen with the weapon. I want to avoid that patch solution.

2. As seen on the video linked, this particular enemy keep using the knife. The knife works right with other enemies and player, and I can't pinpoint whats wrong with this enemy. Pretty sure is a simple overlooked command, but can't find the answer. I'm attaching the enemy in here in case you can take a look.

 

Attachments

1. I want to spawn an enemy with a weapon on a level.

I could guess weapon names based on the trick you've mentioned above so for these enemies should be spawned like this:
Code:
spawn    a2
alias    powa
map    5
item    coin60
weapon    knu
coords    -60 200
at    0

spawn    a2
alias    alberto
item    coin60
weapon    knife2
coords    360 200
at    200

This is from entradastory.txt.

and I can't pinpoint whats wrong with this enemy.

I need to test this enemy but before that how did this enemy gets the knife?

[couple hours later]

I've figured out the cause of this issue. It's because a5weapon4 (weapon model) has ATTACK3 which a5 (main model) doesn't. This causes the latter to be able to perform ATTACK3 by copying it from the former, AFTER he lose the knife.
To solve this, simply add modelflag 7 in a5.txt header text to prevent the copying.
 
Last edited:
I could guess weapon names based on the trick you've mentioned above so for these enemies should be spawned like this:
Code:
spawn    a2
alias    powa
map    5
item    coin60
weapon    knu
coords    -60 200
at    0

spawn    a2
alias    alberto
item    coin60
weapon    knife2
coords    360 200
at    200

This is from entradastory.txt.



I need to test this enemy but before that how did this enemy gets the knife?

[couple hours later]

I've figured out the cause of this issue. It's because a5weapon4 (weapon model) has ATTACK3 which a5 (main model) doesn't. This causes the latter to be able to perform ATTACK3 by copying it from the former, AFTER he lose the knife.
To solve this, simply add modelflag 7 in a5.txt header text to prevent the copying.
Thanks!! That made the trick.
 
Back
Top Bottom