Event System Support (expert users only)

Status
Not open for further replies.

Des

timefantasy.net
Veteran
Joined
Mar 2, 2012
Messages
1,367
Reaction score
494
First Language
American
Primarily Uses
N/A
@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.
 

ShinnMaulana

Villager
Member
Joined
Dec 17, 2012
Messages
6
Reaction score
0
First Language
English
Primarily Uses
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
 

Celianna

Tileset artist
Global Mod
Joined
Mar 1, 2012
Messages
10,531
Reaction score
5,538
First Language
Dutch
Primarily Uses
RMMV
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?
 

ShinnMaulana

Villager
Member
Joined
Dec 17, 2012
Messages
6
Reaction score
0
First Language
English
Primarily Uses
@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
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,315
Reaction score
11,917
First Language
English
Primarily Uses
RMMV
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'.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,071
First Language
English
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.
 
Last edited by a moderator:

ShinnMaulana

Villager
Member
Joined
Dec 17, 2012
Messages
6
Reaction score
0
First Language
English
Primarily Uses
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? :D

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 :(
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,315
Reaction score
11,917
First Language
English
Primarily Uses
RMMV
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?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,315
Reaction score
11,917
First Language
English
Primarily Uses
RMMV
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.





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)
 

ShinnMaulana

Villager
Member
Joined
Dec 17, 2012
Messages
6
Reaction score
0
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,315
Reaction score
11,917
First Language
English
Primarily Uses
RMMV
Lovely :) Glad you finally got what you needed. Sorry I took so long to get you there.
 

Spliff

Villager
Member
Joined
Dec 15, 2012
Messages
10
Reaction score
0
First Language
English
Primarily Uses
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 ?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,315
Reaction score
11,917
First Language
English
Primarily Uses
RMMV
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.
 

Spliff

Villager
Member
Joined
Dec 15, 2012
Messages
10
Reaction score
0
First Language
English
Primarily Uses
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
 

Caranore

Villager
Member
Joined
Dec 21, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
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
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,315
Reaction score
11,917
First Language
English
Primarily Uses
RMMV
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.
 

Caranore

Villager
Member
Joined
Dec 21, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,315
Reaction score
11,917
First Language
English
Primarily Uses
RMMV
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.
 

Caranore

Villager
Member
Joined
Dec 21, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
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.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

OMG! There's a rat themed Steam profile wallpaper for 5k lunar tokens. I want it so badly!
Huh, lots has changed since I've been away...
It's almost new year, again!
Succesfully finished a quest of saving my kitty who fell from a wall!

+25XP

MrKiwi leveled up!
MrKiwi learned how to save his kitty!
Final sprint for me, although a long one. If everything goes well, I'll graduate by the end of the year. Then I'll have to take the Bar classes and exams (4 months), then I'm off to practicing law (as an intern for 6 months, paid of course, then I'll be a full fledged attorney).

Forum statistics

Threads
93,574
Messages
913,598
Members
123,106
Latest member
RezaMaulana98
Top