Orange Custom Event Creator

● ARCHIVED · READ-ONLY
Started by Hudell 20 posts View original ↗
  1. Orange Custom Event Creator 1.0
    Hudell
    Introduction
    This plugin Will let you create new events on the current map using script calls

    How to Use

    Those are the useful methods you can call to use this plugin:

     
    Creating normal events:


    Code:
    $gameMap.createNormalEventAt(characterName, characterIndex, x, y, d, scriptOrCommonEventId, temporary)
    This method will create a regular event with the characterName and Index you specify
    characterName = the name of the spriteset
    characterIndex = the index inside the spriteset
    x = the x position where you want the actor to be
    y = the y position where you want the actor to be
    d = the direction you want the event to be facing (2 = down, 4 = left, 6 = right, 8 = up)
    scriptOrCommonEventId = a script call or the number of a common event id. It will be executed when the player activates the event
    temporary = true or false, indicates if the event will be deleted when the player leaves the map

    Example:
    Code:
    $gameMap.createNormalEventAt('Actor1', 0, 15, 20, 2, 1, true);
    Creating events based on actors:
     


    Code:
    $gameMap.createActorAt(actorId, x, y, d, scriptOrCommonEventId, temporary)
    This one will create an event using the graphics of an actor from the database:
    actorId = The number of the actor you want to use
    x, y, d, scriptOrCommonEventId and temporary = same as in createNormalEventAt

    Example:
    Code:
    $gameMap.createActorAt(1, 15, 20, 2, 1, true);
    Create trigger events:
     


    Code:
    $gameMap.createTriggerEventAt(x, y, scriptOrCommonEventId, temporary)
    This one will create an event without graphics that will be triggered on player touch

    Example:
    Code:
    $gameMap.createTriggerEventAt(15, 20, 1, true);
    Create teleport events:
     


    Code:
    $gameMap.createTeleportEventAt(x, y, newMapId, newX, newY, newDirection, fadeType, temporary)
    This one will create a trigger event to teleport the player to a new map.

    Create Parallel Process events:
     
    Code:
    $gameMap.createParallelProcess(scriptOrCommonEventId, temporary, autoErase)
    This one will create a parallel process event on the curent map.

    Create any kind of event
     
    Code:
    $gameMap.addEvent(eventData, temporary)$gameMap.addEventAt(eventData, x, y, temporary)
    You can create any event with those two methods. Check out the code of this plugin to find out how to use it.


    Plugin
    Get it from here

    Dependencies
    MVCommons
    Orange Custom Events

    FAQ
    I'll keep a small FAQ here for easy reference.

    Credit and Thanks
    - Hudell
  2. I just want to be sure i'm understanding what the script does, but essentially i would be able to, for example, in a non saveable map, make a save point?
  3. Joronjo said:
    I just want to be sure i'm understanding what the script does, but essentially i would be able to, for example, in a non saveable map, make a save point?
    This plugin is used to add new events to the map on the middle of the game.
  4. I would not need to make a template event for it to work?

    Nevermind! I get now! This is awesome!
  5. Bug: The file is missing the comment tags at the beginning so nothing is commented out like it should be.
  6. Fox536 said:
    Bug: The file is missing the comment tags at the beginning so nothing is commented out like it should be.
    Can you send a screenshot? Everything is alright here.
  7. Ya let me get off work, and I'll get a screenshot of it. It looks like the header conment tags are just missing from the download file. As soon as I get off I'll post it.
  8. Sorry for the delay but this is whats in the download file...

    Code:
    =============================================================================  Orange - Custom Event Creator  By Hudell - www.hudell.com  OrangeCustomEventCreator.js  Version 1.0  Free for commercial and non commercial use. =============================================================================  @plugindesc This plugin Will let you create virtual events with script calls                @author Hudell  @help  ============================================================================  Latest Version  ============================================================================    Get the latest version of this script on  httplink.hudell.comcustom-event-creator   =============================================================================

    Im not sure how it happened lol, but im i figured you might wanna know lol

     

    but it seems fixed when i just downloaded it again
  9. Ya that's how they were after I redownloaded them I dont know what happened, but the plugins works great.
  10. This is a great script. I struggled for hours trying to achieve this on a smaller and simpler scale.


    I have a suggestion for future updates. If this is already a feature then I missed it. A boolean parameter for _stepAnime.


    What do you think the cleanest way is to obtain the new event's ID? Right now, to set _stepAnime = false I have to do this:


    $gameMap.createNormalEventAt('Actor2', 2, data.start_x, data.start_y, 2, 1, true);

    new_event_id = $gameMap._events.length;

    $gameMap._events[new_event_id]._stepAnime = false;


    It seems a bit rough to me, but, it works.
  11. That would occasionally work on luck. If you have a map where you deleted any event, it won't work.


    I just changed the creator plugin to return the created event, so you can do this:


    var event = $gameMap.createNormalEventAt('Actor2', 2, data.start_x, data.start_y, 2, 1, true);
    event._stepAnime = false;


    There's also the manual way of creating events:

    Code:
    var eventData = new CustomEventData();
    eventData.page.image.direction = 2;
    eventData.page.image.characterName = 'Actor2';
    eventData.page.image.characterIndex = 2;
    eventData.page.stepAnime = false;
    eventData.page.callScriptOrCommonEvent(1);
    
    $gameMap.addEventAt(eventData, data.start_x, data.start_y, true);
  12. Any way to add an event on top of a player, and have that event use a distance sensor?
  13. You can set any position to the event, if you want to put it on top of the player, simply pick the player position and use it as the event's position.


    What is a distance sensor?
  14. Hudell said:
    You can set any position to the event, if you want to put it on top of the player, simply pick the player position and use it as the event's position.


    What is a distance sensor?

    I was designing a real time battle system, and one of my ideas was to spawn an attack event on the player. Moghunter's Event Sensor plugin allows an event to sense when the player is within x tiles of the event, and can perform actions only if the player is in range of the sensor. I found a different way of doing it, though.
  15. I want to use the plugin but it doesnt seems to work on my project
    Spoiler
    upload_2017-6-21_20-12-13.png
    Spoiler
    upload_2017-6-21_20-13-27.png
  16. The core OrangeCustomEvents needs to be added first, with the Creator plugin after it.
  17. @Hudell , can I set x and y position to actual event position?
  18. You can try using this as the X position inside the script call:

    this.character().x

    same thing for the y position.
  19. Hudell said:
    The core OrangeCustomEvents needs to be added first, with the Creator plugin after it.
    ohhhhhhhhhhhhhhhhhhhhhhhhhhhh . thanks