New account registration is temporarily disabled.

WEAPON SWITCHING "SHOOTER" ABS

Posts

Pages: 1
Hello everyone. I am working on a shooting battle system and I cannot figure out how to make it so when the player picks up a different weapon it switches to it or switches to it when equipped. I am familiar with switches and variables so posting code is just fine. Thanks in advance.
well, how do you handle different weapons? this seems like a pretty lame question. you're the only one who knows how the code of your own abs works.
Oh snikies! My bad. Here part of the code for "Shooting" an enemy.

<>Branch if hero Down Facing
<>Memorize Location: (Hero's Location)
<>Variable Oper: Set,Z1 X Coord.
<>Variable Oper: Set,Z1 Y Coord.
<>Branch if Var [Hero X is V Equal
<>Branch if Var [Hero Y is V Less
<>Show Battle Animation: Snowball,Z1
<>Variable Oper: - ,1
:Else Handler
<>
yatta, yatta, yatta.....
so, um. i guess you would just create a conditional branch whenever you press the "shoot" button to check what kind of weapon the player is holding, and then have the appropriate code in each branch?
Sounds like a plan. I am also having troubles with making the enemies completly disapear after the enemy is dead. The hero can still shoot at where he was. The script for shooting enemies is in a seperate event and I've tried erasing both the enemy and the shooting script event and still no luck. If this doesn't make sence, I'm sorry. :)
Set a conditional branch that checks if the enemy has 0 HP. If so, make so nothing happens if it passes the dead enemy. Another way is to teleport the enemy to an inaccessible location on the map when it's shot down.
I had no idea you could teleport other things besides the hero. Does that involve location memorizing?
You can teleport events other than the hero with the 'Change event location' command (I think it was named that). And by location memorizing I suppose you send them to a location given by variables that can be defined elsewhere.
Another problem I am having is that I want to reuse an enemy on a different map, so I don't have to keep programming new ones. I have tried resetting it's HP and nothing happens.
author=Doom_Bloomer
Another problem I am having is that I want to reuse an enemy on a different map, so I don't have to keep programming new ones. I have tried resetting it's HP and nothing happens.


Copy paste the enemy then make sure you reset every switch, variable, sprite, etc. related to it during an Auto Start event on that second map.
So it has to be auto start? I've been using parallel process. Man... If it was that easy... I feel silly.
I have tried everything suggested, I've set the enemy health back to where it's supposed to be, all the switches are in place.... No luck.
Can you tell me exactly what happens on your maps? And what commands are in your battle-related events?
I'm more the visual type of person so I need to either see it or have a thorough explanation to understand and help :|
No... Cause I can't just copy and paste the code here. I'm not gonna worry about it any more.
Pages: 1