How can I create an event through a script?

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
In short : The player is transfered one tile forward and I want an event with the graphic of the player Appear at the previous location of the player. ( I have followers dissapear In the meanwhile). 

However I don't know how to create that event through script or any other way....

If the event was to be created at a certain location I would know how to do it
Also if it was for just a single map I would place an event hidden somewhere and have  it transfer to the players previous location afterwards.

But in this case I want the event to be able to be created at any map of the game( without having to place an event hidden on every map).
 
Last edited by a moderator:

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
The usual way to spawn events is to have them in some "template" map, that the player can never enter. Via a script call, the event is then copied and added to the events of the current map.

Note that the event will be gone if the player leaves and re-enters the map this way.

/edit: You could also use Tsukihime's Event Wrapper to directly create events: http://forums.rpgmakerweb.com/index.php?/topic/3148-event-wrapper/
 
Last edited by a moderator:

Soul

Veteran
Veteran
Joined
Aug 14, 2013
Messages
222
Reaction score
59
First Language
English
Primarily Uses
This is where switches are handy. Make an event, where you want it to appear. Leave everything alone on there - well, maybe change its name at least, as if you end up using something like "Set Move Route" later, it can make your life a lot easier. But now, go and make a new page. In the top-left corner, below where the event name is, you'll find a short list. Check the first box, and open it up. Name a switch.

From that point on, Page 2 of the event will only occur when that switch is flipped. It will disappear when the switch is turned off. Turn a switch on by using the "Control Switches" command from the first page of the event commands, left-hand side down a...box-window-thing. Can't remember its title right now, and unable to get onto Steam long enough to tell ya. Should be easy enough to see. As I assume this is for a cut-scene, you can have the switch flipped within the same event as the rest of the cut-scene. No need for a script as the feature you wanted was built into the engine already.

If you're relatively new to using RPG Maker, I'd recommend taking a look at some tutorials made by Andar:

http://forums.rpgmakerweb.com/index.php?/topic/14727-a-starting-point-for-new-users-v10/
 
Last edited by a moderator:

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
The usual way to spawn events is to have them in some "template" map, that the player can never enter. Via a script call, the event is then copied and added to the events of the current map.

Note that the event will be gone if the player leaves and re-enters the map this way.

/edit: You could also use Tsukihime's Event Wrapper to directly create events: http://forums.rpgmakerweb.com/index.php?/topic/3148-event-wrapper/
I am quite new to RGGS3 , How do I call the event through a script ?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
If you're new to scripting, forget using the event wrapper - that is for advanced users and needs a good understanding of data structures.


You should follow the other advice and use premade events that are just teleported to the place where you want them.


That can be done completely without scripting if you have the event out of sight on all maps where it is needed, and needs only a rather simple copy event script in case you need it on too many maps to prepare all of them.


However, there are already several existing summoning scripts - perhaps you should give us a full explanation of what you want to have in your game, and then we can point you to better solutions.
 

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
If you're new to scripting, forget using the event wrapper - that is for advanced users and needs a good understanding of data structures.

You should follow the other advice and use premade events that are just teleported to the place where you want them.

That can be done completely without scripting if you have the event out of sight on all maps where it is needed, and needs only a rather simple copy event script in case you need it on too many maps to prepare all of them.

However, there are already several existing summoning scripts - perhaps you should give us a full explanation of what you want to have in your game, and then we can point you to better solutions.
The player casts a spell the spell creates a familiar in front of the player . The can move this familiar to otherwise unreachable areas. The Player's and the familiar's senses are mutual. Also the player can transmit his voice through the familiar in order to interact with NPCs. On higher levels , the player can swap places with the familiar. The familiar can't pick up items . 

So Right now I have the player tranfer one position forward and change graphic. To the past location of the player I want to create a graphic with the player avatar.   

After I do this I want to turn All tiles with Terrain Tag 1 into walkable tiles for as long as you are moving the familiar. 

To turn back to normal you interact with the event created before.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Descriptions really help ;-)


I suggest you should look at this script:


http://himeworks.com/2013/08/player-manager/


Create the familiar as an additional player and the swap on higher levels becomes automatic, including leaving the real playyer data intact.


The only thing that might become tricky is teleporting the other player to the current player when sumoning and teleporting it away after the switch back.


But that should be easy compared to handling the rest...
 

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
So I can create the "second player" through the summon spell ? Then delete him after switch back ? 
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top