Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> ABS Enemy Repeat, He keeps exploding!
trhh
post Feb 7 2012, 09:49 AM
Post #1


Level 2
Group Icon

Group: Member
Posts: 18
Type: Mapper
RM Skill: Beginner




I'm working on this ABS and when you start on map 1 no enemy's are on the map. When you go to map 2 I have an enemy that you can kill but I want to make it so that after you kill that enemy you could go back to map 1, then reenter map 2 and fight the same enemy again. Problem is every time I keep reentering map 2 the enemy shows the animation when he is exploding and he disappears. Any ideas on how to fix this? It's gotta be something wrong with one of my events, or I'm not triggering something.


__________________________
GET TO DA CHOPPAH!
Go to the top of the page
 
+Quote Post
   
Oceans Dream
post Feb 7 2012, 10:07 AM
Post #2


efffortt
Group Icon

Group: Revolutionary
Posts: 5,592
Type: Developer
RM Skill: Advanced




Hmm, well when you leave map 2, you may want to reset the enemies HP/death switches or whatever you have on for them. I might need to take a look at your code to see how you're doing it though. Maybe screenshot the enemies code?

I'd recommend either having a switch you turn on to kill the enemy when they're at 0 HP and then turning it off when you leave that map, or having it as Erase event so it's gone until you re-enter the map.

This post has been edited by Oceans Dream: Feb 7 2012, 10:08 AM


__________________________

Ocean's Dreams blog! Contains RPG Design topics, Game updates and others!
Also check out my tumblr for smaller but more frequent updates!
http://oceansdreams.tumblr.com/

Go to the top of the page
 
+Quote Post
   
trhh
post Feb 7 2012, 04:09 PM
Post #3


Level 2
Group Icon

Group: Member
Posts: 18
Type: Mapper
RM Skill: Beginner




QUOTE (Oceans Dream @ Feb 7 2012, 11:07 AM) *
Hmm, well when you leave map 2, you may want to reset the enemies HP/death switches or whatever you have on for them. I might need to take a look at your code to see how you're doing it though. Maybe screenshot the enemies code?

I'd recommend either having a switch you turn on to kill the enemy when they're at 0 HP and then turning it off when you leave that map, or having it as Erase event so it's gone until you re-enter the map.


Okay so here's what I have set up on my map. I have an event called "start enemy" thats turned on.
http://desmond.imageshack.us/Himg708/scale...&res=medium

and here is the event for the enemy.
http://desmond.imageshack.us/Himg706/scale...&res=medium

http://desmond.imageshack.us/Himg27/scaled...&res=medium

http://desmond.imageshack.us/Himg16/scaled...&res=medium

http://desmond.imageshack.us/Himg651/scale...&res=medium

http://desmond.imageshack.us/Himg209/scale...&res=medium

It's prolly some little thing I forgot to do. Every time I walk back to map 2 it just shows him exploding. Any help would be greatly appreciated. biggrin.gif


__________________________
GET TO DA CHOPPAH!
Go to the top of the page
 
+Quote Post
   
Oceans Dream
post Feb 7 2012, 08:39 PM
Post #4


efffortt
Group Icon

Group: Revolutionary
Posts: 5,592
Type: Developer
RM Skill: Advanced




You have Start Enemy switch on Parallel Process, which is why this happens. You'll want that first event that has "Switch Operation: Start Enemy is on" to be on Autostart. And before you turn that switch on, set the enemy HP back to 0. Then, erase event.

Otherwise, with a parallel process, what it's doing is turning back on the switch that you turned off when the enemy is supposed to die as it'll keep running until you tell it not to (erase event, or a new page with a switch for example). So yeah, I'd recommend autostart for that first event.

Lemme know if that works!

This post has been edited by Oceans Dream: Feb 7 2012, 08:42 PM


__________________________

Ocean's Dreams blog! Contains RPG Design topics, Game updates and others!
Also check out my tumblr for smaller but more frequent updates!
http://oceansdreams.tumblr.com/

Go to the top of the page
 
+Quote Post
   
trhh
post Feb 8 2012, 12:18 PM
Post #5


Level 2
Group Icon

Group: Member
Posts: 18
Type: Mapper
RM Skill: Beginner




QUOTE (Oceans Dream @ Feb 7 2012, 08:39 PM) *
You have Start Enemy switch on Parallel Process, which is why this happens. You'll want that first event that has "Switch Operation: Start Enemy is on" to be on Autostart. And before you turn that switch on, set the enemy HP back to 0. Then, erase event.

Otherwise, with a parallel process, what it's doing is turning back on the switch that you turned off when the enemy is supposed to die as it'll keep running until you tell it not to (erase event, or a new page with a switch for example). So yeah, I'd recommend autostart for that first event.

Lemme know if that works!


Okay I did that and it didn't work. However I turned all of the enemy's parallel process to autostart and that seemed like it did the trick. The only thing is, I enter map 2 from map one kill the enemy and then go back to map 1. I then renter map 2 and then he explodes. However when I do it a third time he doesn't explode. Hard to explain, but I'll keep messing around with it. If you think of anything as to why it may be doing this let me know.

[EDIT] Oaky I fixed the issue however when I copy the same enemy and change his variables to enemy 2 (health, and everything else that isnt enemy 1) when i kill enemy 1 enemy 2 disappears. Any ideas on this?

[EDIT 2] Okay! sorry this is the last edit. I have two enemy's on map 2, and now I can kill one and then kill the other with out one exploding. Now the issue is again, when I reneter map 2 the second time they both explode. But when I renter a third time they do not. It seems to be every other time I enter they explode. Currently my map event is set like this:

<>Var Oper Enemy 2 HP set 0
<>erase event
<>Var Oper Enemy 1 HP set 0
<>erase event
<>switch operation start enemy ON

any ideas?

This post has been edited by trhh: Feb 8 2012, 12:55 PM


__________________________
GET TO DA CHOPPAH!
Go to the top of the page
 
+Quote Post
   
Oceans Dream
post Feb 8 2012, 02:06 PM
Post #6


efffortt
Group Icon

Group: Revolutionary
Posts: 5,592
Type: Developer
RM Skill: Advanced




Don't put the erase event until after the end of the Switch operation start enemy ON.

Try to see that enemy 2 isn't using any switches from Enemy 1 also, but I don't think you used any other than start Enemy on.


__________________________

Ocean's Dreams blog! Contains RPG Design topics, Game updates and others!
Also check out my tumblr for smaller but more frequent updates!
http://oceansdreams.tumblr.com/

Go to the top of the page
 
+Quote Post
   
trhh
post Feb 8 2012, 07:07 PM
Post #7


Level 2
Group Icon

Group: Member
Posts: 18
Type: Mapper
RM Skill: Beginner




QUOTE (Oceans Dream @ Feb 8 2012, 02:06 PM) *
Don't put the erase event until after the end of the Switch operation start enemy ON.

Try to see that enemy 2 isn't using any switches from Enemy 1 also, but I don't think you used any other than start Enemy on.


The only switches both are using are the same "start enemy" event which is on the map. A "punching" event that is on the map, and a "shooting" event. The shooting and punching events are switches "preconditions" for both. The only thing I see here is that when I remove one of the enemies, everything works. I can kill him leave map 2, and then enter map 2 and can kill him again. So that works! However when I add that second enemy I enter the map 2 the first time and can kill both of them. Then when I enter it again, one explodes and the other one doesnt. If it helps I can send you a barebones file of the game. I think it may have something to do with the "start enemy" map event. Because both enemies are identical only difference is the variables.


__________________________
GET TO DA CHOPPAH!
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 10:58 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker