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
99
Reaction score
74
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,865
Reaction score
14,989
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,865
Reaction score
14,989
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



Here's Azrael sprite with the fire weapon, hope it came out good.
A13774F4-298B-4F4D-B639-E6921E49FCC2.jpeg
Art test for a victory title screen change
illuminatigirl.png
Illuminati may be just a cover-up for the actual secret society of Illuminaughty. :kaojoy:
Got distracted... again. So now I'm on project.... 5? 6? I can't even remember off the top of my head how many plugins I have in the works. Though I blame the latest two on a coding youtuber I watch occasionally. He codes in C++ but walks through the process well enough that it inspires me to do similar things for JS plugins. So... blame him for my lack of activity. lol

Forum statistics

Threads
113,760
Messages
1,077,249
Members
147,795
Latest member
AppleCider
Top