[RM2K3] AN ACCESSORY KEEPS REMOVING ITSELF IN THIS EVENT I'M MAKING...

Posts

Pages: 1
In my game, the main gimmick is a system that can change the player into an animal when they put on special accessories. But the problem is, the event keeps undoing itself for some reason.

Here's the common event I've set up. It's a parallel process that checks to see if the hero is wearing a special item. In this case, a Dog Collar:
<>Branch if Dawn Dog Collar Equipped
Note: The following is just fancy transforming stuff.
<>Tint Screen: (R050,G050,B050,S050), 1.5 Sec (Wait)
<>Show Battle Animation: Recovery C, Hero (Wait)
<>Change Sprite Association: Dawn animal-1
<>Tint Screen: R100,G100,B100,S100), 1.0 Sec (Wait)
<>Change Class: Dawn Dog, No Level Change, Deleted Old Skills, Add New, No Stat Change
<>Change Face Association: Dawn faces2-9
<>Switch Operation: ON


Now, this parallel process has a trigger switch (the last one didn't, by the way) that turns on when "Dog Power" is on.

<>Branch if Dawn Dog Collar Equipped
<>
Note: This event shouldn't do anything if the hero has the collar on
:Else Handler
Note: More fancy stuff
<>Show Battle Animation: Recall C, Hero (Wait)
<>Change Sprite Association: Dawn hero4-5
<>Change Face Association: Dawn hero2-13
<>Change Class: Dawn Hero A, No Level Change, Delete Old Skills, Add New, No Stat Change
<>Switch Operation: OFF


The bottom line is, if the hero puts on the Dog Collar they'll turn into a dog. If they take it off they'll turn back into a human. Right now, though, the event forces the collar off as soon as the the first event finishes, so the hero turns into a human again right after they're a dog.

I get the feeling the switch has something to do with it. I've never been good with working switches. Does anyone know how I could fix this?
Marrend
Guardian of the Description Thread
21781
I'm not seeing anywhere in that code that would take the collar off. That aside, it might depend on how these events are called. My current guess is that the event calling these are a particular kind of parallel process. I would also guess that you're activating the switches in an attempt to force the two pieces of code you're presenting here onto two different pages?

*Edit: This seems like a really dumb thing to ask, but, both the "Human" and "Dog" forms (classes) can equip the collar, right? Though, I have no idea if the class change event-command handles the character having class-restricted equipment! However, that's the best lead I got at the moment.
Do you not have waits at the end of those events? Every repeating event should have at minimum a 0.0 wait(it works out to be 0.03 seconds or something tiny). It really does make a difference even though you might not think so. Try adding small waits, and then increase them a bit to see if that helps. And keep that in mind for all future coding. Waits are important for the pacing and order of your code.

If that doesn't work, consider changing the above common events to call events and use an external process to call on it once.
I had them set up as two different events in an attempt to fix the problem, because it did this when it was all one event.

Edit because I didn't see Link's post:

I didn't think of setting up a wait. An external process? That's something on the map instead of a common event, right?
NeverSilent
Got any Dexreth amulets?
6299
I'm taking a wild guess here, but could the problem just be that one of the hero's classes simply does not allow for him to wear said collar? That could force the unequip and make the event revert itself.
author=NeverSilent
I'm taking a wild guess here, but could the problem just be that one of the hero's classes simply does not allow for him to wear said collar? That could force the unequip and make the event revert itself.


I made sure the classes wouldn't be a problem. It's good thought, though.
NeverSilent
Got any Dexreth amulets?
6299
Ah well, I tried. Better go with what Link_2112 said: Add a very short wait at the end of the first and the beginning of the second event.
Good luck.
Sigh. I tried adding waits, and I tried changing the events from parallel processes to be called events. Nothing's changed yet.

This is annoying! I have no clue as to what could be causing this to happen. XD

This is odd... I tried to have the second event turn off the switch if the collar is on just to see what would happen, and it acted like the switch was still on. To me that seems to say that the collar comes off the moment the first event ends and before the second event can check it like it should. What does this mean...? :/
NeverSilent
Got any Dexreth amulets?
6299
Hm, one last (and possibly stupid) suggestion: Could you try and add a command that manually equips the collar again in the first event? About like this:

<>Branch if Dawn Dog Collar Equipped
Note: The following is just fancy transforming stuff.
<>Tint Screen: (R050,G050,B050,S050), 1.5 Sec (Wait)
<>Show Battle Animation: Recovery C, Hero (Wait)
<>Change Sprite Association: Dawn animal-1
<>Tint Screen: R100,G100,B100,S100), 1.0 Sec (Wait)
<>Change Class: Dawn Dog, No Level Change, Deleted Old Skills, Add New, No Stat Change
<>Change Face Association: Dawn faces2-9
<>Wait 0.0
<>Change Equip: equip Dawn Dog Collar
<>Wait 0.0

<>Switch Operation: ON

Other than that, I'm out of ideas. Hopefully you can figure it out.
author=NeverSilent
Hm, one last (and possibly stupid) suggestion: Could you try and add a command that manually equips the collar again in the first event? About like this:

<>Branch if Dawn Dog Collar Equipped
Note: The following is just fancy transforming stuff.
<>Tint Screen: (R050,G050,B050,S050), 1.5 Sec (Wait)
<>Show Battle Animation: Recovery C, Hero (Wait)
<>Change Sprite Association: Dawn animal-1
<>Tint Screen: R100,G100,B100,S100), 1.0 Sec (Wait)
<>Change Class: Dawn Dog, No Level Change, Deleted Old Skills, Add New, No Stat Change
<>Change Face Association: Dawn faces2-9
<>Wait 0.0
<>Change Equip: equip Dawn Dog Collar
<>Wait 0.0

<>Switch Operation: ON

Other than that, I'm out of ideas. Hopefully you can figure it out.

I think you're on the right track, but the placement is off. Doing that made the recovery animation play on repeat.

Edit: It worked! I forgot to make the event a called one again. But after changing that it works perfectly!

Thanks so much to everyone to offered help!
You... you would have to make the same thing for all other pieces of equipment that the person/animal has worn, as well. Adding more possibilities for errors, creating complications when equipment does depend on JobClasses and so on.

Here's a fix:
download ClassChangeEquipFix


I like the fact that nobody noticed that all equipment gets un-equipped when using the <ChangeJobClass> command ...

Also: what's up with all those 0.0 waits? They fix nothing.
They only give the computer's CPU some time to catch up if stuff was flat out screwed up, like tons of event updates and tons of events on-map (but there's fixes for that already).
Marrend
Guardian of the Description Thread
21781
author=bugmenot
I like the fact that nobody noticed that all equipment gets un-equipped when using the <ChangeJobClass> command ...


Well...

author=Marrend
Though, I have no idea if the class change event-command handles the character having class-restricted equipment!


...this is what happens when you don't use 2K3, like, ever.
Pages: 1