What is the outline of a piece of script that is used in events?

Status
Not open for further replies.

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Okay, so I was working on a map, and I wanted to make a little area where the player can walk over to a pile of gold, use it to pick it up, and then have the pile of gold be replaced by another blank floor tile.

I got the tile swap script and all that, inserted it into the script editor. all of that. But I ended up getting a syntax error with the script call. Game_Interpreter 1411: invalid octal digit.

For the record, I don't think it was the script file.

What I want to know is, when you add in an event command and choose to plug in some script functions, do you immediately just put in the script call? Or is there a framework that needs to be put in first?

Sorry if this is the wrong place or way to ask, i'm having a hard time finding a good reference to go off of with this D:

I'm still trying to wrap my arms around Rubyscript as a whole.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Yes, you just write your script calls anywhere that supports scripts.

For your problem specifically, you are probably writing your numbers like

Code:
093
instead of just writing it normally like
Code:
93
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Yes, you just write your script calls anywhere that supports scripts.

For your problem specifically, you are probably writing your numbers like

093instead of just writing it normally like
Code:
93
Damnit, i'm a dummy. Well, now i'm having a new problem. uninitialized constant A145. This may be a problem with the Tile Swap script instead, however.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
However, you don't need a tileswap script for that - simply make the gold an event and switch the event off after taking it.

Edit

If you have problems with the script calls, please make a screenshot of the event making the script call and post that screenshot here
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Damnit, i'm a dummy. Well, now i'm having a new problem. uninitialized constant A145. This may be a problem with the Tile Swap script instead, however.
You're missing the quotation marks

Code:
"A145"
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
However, you don't need a tileswap script for that - simply make the gold an event and switch the event off after taking it.

Edit

If you have problems with the script calls, please make a screenshot of the event making the script call and post that screenshot here
.......wat

Uh....care to explain that a little bit further?

Also, quotation marks did fix the crashes finally. Too bad it turns out the swap script was a bad idea Dx

Also, putting in an erase event did not remove the gold.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
.......wat

Uh....care to explain that a little bit further?
Attached are the two pages of a simple event that can be copied to any map. It will give a message and 100 gold when the player first steps on that event and disappear after that.

Edit: erase event is ALWAYS only temporary - please follow the link in my signature for the tutorials to learn how to work with RM Ace, it appears that you're trying to work on the editor without checking the tutorials first, and Ace has enough little quirks to make that a bad idea

goldpile1.png

goldpile2.png
 
Last edited by a moderator:

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Attached are the two pages of a simple event that can be copied to any map. It will give a message and 100 gold when the player first steps on that event and disappear after that.

Edit: erase event is ALWAYS only temporary - please follow the link in my signature for the tutorials to learn how to work with RM Ace, it appears that you're trying to work on the editor without checking the tutorials first, and Ace has enough little quirks to make that a bad idea
This is nice. Well, actually, I have read the thread in your signature. And I see what I was doing wrong now. However, now when I start up a playtest, the event starts out gone. Maybe the switch is somehow starting out off.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Do you start a new game or do you load a savegame?

On a new game, all switches start OFF (unless a script manipulates them)

In a savegame, the switches are loaded to the status they had when saving the game.

If you used a general switch instead of a self-switch, then the third possibility is that another event or a script uses the same general switch and turns that ON before you get to the gold.

The general switches will not work in the case of a gold pile anyway, because by copying only self-switches remain independant - a general switch copied would slave all events to the same general switch (which might be required by other things, but would be bad for gold piles)
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Do you start a new game or do you load a savegame?

On a new game, all switches start OFF (unless a script manipulates them)

In a savegame, the switches are loaded to the status they had when saving the game.

If you used a general switch instead of a self-switch, then the third possibility is that another event or a script uses the same general switch and turns that ON before you get to the gold.

The general switches will not work in the case of a gold pile anyway, because by copying only self-switches remain independant - a general switch copied would slave all events to the same general switch (which might be required by other things, but would be bad for gold piles)
It's all new games and stuff. nevermind, I figured it out on my own.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You probably had the first page with a condition, or the second page with no condition, so the correct page was not being made active.


Anyway, since you figured it out ...


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.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top