manji
RPG Making Novice
Posts: 64
|
Post by manji on Apr 22, 2006 11:33:34 GMT -5
i read rodak's post in the common script thread, but it didn't really make sense with what i am trying do..
so, i'm working on a cbs where the enemy models will be, at max, 4 on a battle map. i have my battle system set in the enter script slot(world org.) of this particular battle map where the enemy models are loaded. now, i made a "load enemy models" script, in which i call for it in the battle system script.
i want their appearence to be random, like sometimes having one enemy show up, while another time having all 4, while another time only 2 or 3, etc. problem is, only 2 of the 5 outcomes seem to happen.
my script looks something like this: Enemy Model 1, 2, 3 & 4 Transparency 100% (this is so they are invisible when you appear on the battle map because the enemy models are placed as events)
Data: Variable: Monster Total = 1 ? 5 Script Branch Condition: Monster Total = 1 Event Control: Enemy Model 1 Event Effects: Transparency 0% Script Branch End -- Script Branch Condition: Monster Total = 2 Event Control: Enemy Model 1 Event Effects: Transparency 0% Event Control: Enemy Model 2 Event Effects: Transparency 0% Script Branch End -- etc...
and for some reason, i'm only getting 2 of the 5 or so outcomes i made.
any suggestions?
|
|
|
Post by Rodak on Apr 22, 2006 12:14:51 GMT -5
As a test script change the value from random to one of the numbers you are not getting.
That will debug any problems with the script (if you say #=3 and nothing happens, the script is wrong!)
Is this a called script?
You may need to "Wait for script end" in that case.
I would need to see the file to give a better answer.
Good Luck.
Peace.
|
|
|
Post by Dungeon Warden on Apr 22, 2006 15:52:02 GMT -5
It has already been said that you can't generate a random number from an enter map script since the number is generated based on how long the party has been on the scene after entering the map. Someone (Blood Knight?) suggested generating the number before the party enters the map and saving it in a variable to be used when needed. That should work in this case.
I hope that helps.
|
|
|
Post by BloodKnight on Apr 23, 2006 1:38:56 GMT -5
Yes, you can just record the randomizing variable as you travel, so it won't be so predictable. Or you can just wait a few frames and randomize, that might work too.
|
|
manji
RPG Making Novice
Posts: 64
|
Post by manji on Apr 24, 2006 9:02:32 GMT -5
thanks guys. it's working now.
|
|