Event System Support (expert users only)

@Celianna:Just trying to get the guy to fall down to the ground from a standing position. I've gotten half of it to work just cant seem to get him into the laying position.
If you're having a hard time selecting a specific frame, try this in the script section of the move route command:



instance_eval("@pattern = 0")

use a 0 for the first frame, 1 for the middle frame, and a 2 for the frame on the right. before using this code, you'll just need to make sure that the sprite is facing in the direction that you want. this code will allow you to set the sprite to a specific "step" frame.
Bro, I have a problem in event system.

i have to use a script in my game that I made with RMVXAce.

my problem is, how to replace switch or maybe event page on my game become a script.

the example is, if my character have an "A" item on his inventory, then variable "score" will get 10 value.

it will simply solved if I used switch on the event page, but how if i "must" use a script to do it?

thanks for appreciation
Bro, I have a problem in event system.

i have to use a script in my game that I made with RMVXAce.

my problem is, how to replace switch or maybe event page on my game become a script.

the example is, if my character have an "A" item on his inventory, then variable "score" will get 10 value.

it will simply solved if I used switch on the event page, but how if i "must" use a script to do it?

thanks for appreciation
What script are you talking about? Actually, what are you talking about? Can you show us a screenshot of what you're trying to do?
@Celianna thanks for fast reply

this one..this condition will be fullfilled if player has item "Flash disk aguu" on his inventory.

my problem is, is it possible to convert this condition into script? not just klick and klick like this.

script.PNG
Why would you want to convert it into a script? How would you use it if you could convert it to a script? The editor requires a LOT of clicking to create events. You can't just type the commands in, which is a tad annoying for people who are used to doing a lot of scripting or programming.

The Conditional Branch has an option that allows you to check if an item is in inventory. So you don't have to have two event tabs that are practically the same, apart from what happens if you have the item. You can just have one tab with all the text, then do a Conditional Branch (is item ??? in inventory) and add actions for 'yes' and 'no'.
it will simply solved if I used switch on the event page, but how if i "must" use a script to do it?
If it can be solved simply by using a switch then there is no need to use a script.

Unless using a script makes it even simpler of course, but I don't think what you are trying to do would be easier with a script.
The Conditional Branch has an option that allows you to check if an item is in inventory. So you don't have to have two event tabs that are practically the same, apart from what happens if you have the item. You can just have one tab with all the text, then do a Conditional Branch (is item ??? in inventory) and add actions for 'yes' and 'no'.
nah, conditional branch..is it possible to make a conditional branch become a script? 😀

If it can be solved simply by using a switch then there is no need to use a script.

Unless using a script makes it even simpler of course, but I don't think what you are trying to do would be easier with a script.
i have a task about it, and i have to use a script 🙁
Conditional Branch has a script option. I don't understand why you're so 'hung up' on turning something into 'a script' - unless your meaning of the word 'script' differs greatly from mine. You only ever resort to using a script if there's no way to do something via event commands. And Ace tries to give the best of both worlds by giving you an event command just for adding a little script, AND by using a script line in the conditional branch.

Why do you have to use a script? And you better define what you mean by 'script', just in case we're talking about different things.

What script are you using that is forcing you to ignore the existing event commands?
Conditional Branch has a script option.
would you give me a sample script that are avalaible to that conditional branch script option please?
Well, there are a few ways you can check for an item in inventory, and the best way depends on what it is you're trying to do. Anyway, since I'm still not clear on your goal, I'll give you several, and you can see if any of those will work for you. I'll use Potion (item 001) as an example.

Spoiler
ItemExistsCondition_zps9746a998.jpg


ItemExistsConditionalBranch_zps8a65908e.jpg


ItemExistsConditionalBranchScript_zps0fd0084b.jpg
If you REALLY want to use the scripts (as in, script editor you get when you hit F11), the text that's in that last example is what you'd use.

If you want to ensure the player has a specific number of those items, that's done slightly differently (Control Variables lets you get the count of the items, which you can then use in a conditional branch)
Spoiler
[IMG]http://i337.photobucket.com/albums/n362/amshaz/VXAce/HowTo/ItemExistsConditionalBranchScript_zps0fd0084b.jpg[/IMG]
yesss..this one..this one is really that i wanted..thank u very much Shaz.. 🙂

there is no error actually. lol. sorry for the trouble

its all has beed solved..thanks to everyone
Lovely 🙂 Glad you finally got what you needed. Sorry I took so long to get you there.
Im trying to make a door event that checks if a weapon and body armor are equiped before the map transfer trying to put in checks if items are equiped or in inventory all works fine on page 1 of event but it wont run page 2 of my event i did turn on self switches in page one and have page 2 set to a self switch condition and nothing happens.. They are set to right switch switch a as well. any advice ?
Show us your two event pages, otherwise we're just guessing.

And my guess is:

If your first page checks for the items and equipment, then turns on a self switch, the second page (which I assume is conditioned by that self switch) will not run automatically. You still have to interact with the event.

What I would do here is have just one page, use a Conditional Branch to see if the player has all the items/equipment necessary, and in the 'true' part, do the teleport; in the 'false/else' part, either do nothing or show a message that they need to have the stuff.
I got it stupid me lol. Still pretty knew to rpg maker but not development. Simply needed a lable on second page to jump too, to perform other functions
So, im back again in a new thread. Im trying to make an event that runs once I get out of the dungeon.

Since Im putting the event on the world map, my main problem is once I leave the starting area and enter the world map, the whole thing freezes.

I only want the event to run once too, so I know I need to add a self switch there (the second event page is for that), but i have no idea what Im missing from this event to make it not be there when I pass it the first time, run once I get out of the dungeon, and never run again.

Untitled2.png
Is that switch turned on when you leave the starting area? If it is, then your move route might be trying to move your character somewhere you can't go. It should at least make your character turn up.

If you're ever not sure which part is running, if any, just use a script command to print something to the console (or even a show text command) just so you can be sure which part of the event it's actually trying to process.

Since you have a second page, is it conditioned? If you don't have the conditioning self switch, the game will look at THAT tab, which I assume contains no event commands, and nothing will happen. When an event is loaded, the engine looks from the highest-numbered tab to the lowest-numbered tab, and as soon as it finds one where the conditions are met, that's the one it will run. So if you have no conditions on your second tab yet, that's where your problem is.
The second tab is just is "Control Self Shift B" is On, nothing will run. And as you can see, the 1st script page will have Control switch B active at the end of the event.
okay then, I'd question whether switch 5 is on. Also make sure the tileset you're using for this map has a star as the passability setting on the top left tile of Tile/Tab B.
See, if I turn it off Autorun, it works perfectly fine. The only problem is I need it to be on Autorun so that it activates the second I step out of the cave.

Heres my event outline:

-Enter Cave

-Beat Miniboss

-Switch 5 is turned on

-Exit Cave via transfer event after boss

-Have NPC walk from town right below cave up to Actor 1 with a message

-Have NPC walk back to town and disappear after delivering message

-End second event without it recurring again.

The main problem I see with that is that the event would be on the world map, so it would be a lot harder than a cutscene when you first enter a village so to speak.

Original thread: https://forums.rpgmakerweb.com/threads/event-system-support-expert-users-only.51/