Trying to spawn visible monsters at random

Status
Not open for further replies.

tomexplodes

Veteran
Veteran
Joined
Oct 15, 2012
Messages
32
Reaction score
6
First Language
English
Primarily Uses
asf.png
So here's the event. The other pages just have different pictures/battles/and the correct self-switches turning off. There are a couple problems. I've got several copies of this event, also, with all of the switches/variables changed by a numeral in the name, so they're not all calling the same ones. It sort of works. Sometimes monsters will spawn eventually, which is what I want. But sometimes, as soon as I defeat one, another one that is the same monster spawns instantly. That shouldn't happen, it should take 20 seconds before it decides that again, or at least I THINK that's what I told it to do.

So, if somebody could tell me what I've done wrong in here, I'd sure appreciate it. Thanks!
 

Walldeaf

The Event-Master
Veteran
Joined
Apr 29, 2013
Messages
92
Reaction score
71
First Language
Dutch
Primarily Uses
RMVXA
Try to reset your variable 81 to 0 after the update.
The value remains between 1 and 7 as I read it at the current state.

So it will be:

Self switch A = on
Control switch 0006 = off
Set variable 81 = 0

That's should be it.

PS: Also curious about what happens if the value is 6 or 7 ?
Does the timer continue to run as well ?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,531
Reaction score
14,848
First Language
English
Primarily Uses
RMMV
A few issues here.

You probably don't need the switch as a condition on page 1, unless you only want this to happen at certain points in the game. So you can get rid of the condition on that page, and on every page where you turn that switch on or off you can get rid of those commands as well.

Here is why you're getting the same monster again as soon as you defeat one ...

Your check for timer >= 20 will only happen every 20 seconds. But the check for what monster is going to spawn is OUTside that block, so that is going to happen every second. Grab all those "if monster = 1" ... "If monster >= 5" and move them INto the "if timer >= 20" block. That way ALL the monster processing will only happen after 20 seconds.

If you're not going to do anything special when the player wins or escapes, just uncheck the "can escape" and "can lose" boxes.

Everything else looks okay.
 

tomexplodes

Veteran
Veteran
Joined
Oct 15, 2012
Messages
32
Reaction score
6
First Language
English
Primarily Uses
Okay, thanks, both of you! Here is my new event setup! I'm going to try it out and make sure it seems to be working right on my end, but just want to make sure it looks right now, so here it is. Untitled.png
 

tomexplodes

Veteran
Veteran
Joined
Oct 15, 2012
Messages
32
Reaction score
6
First Language
English
Primarily Uses
And yeah, I goofed it there. I put in else functions after, now it seems to be working properly. Thanks again!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,531
Reaction score
14,848
First Language
English
Primarily Uses
RMMV

@tomexplodes, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.



Yep, with the Else branches in there, it looks good.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Figured I would start posting what I am working on here. Anyways, a quest system plugin I have been working on:
20mgjmZ.png


What features would yall like to see in a quest system?
Playing my game to improve my game. (Totally not procrastinating)
Hope he recovers fast :|
Looks like it's functional:

Forum statistics

Threads
112,502
Messages
1,068,744
Members
146,176
Latest member
MissOclock
Top