Quasi Movement

Discussion in 'JS Plugin Releases (RMMV)' started by Quxios, Nov 1, 2015.

  1. Lakaroth

    Lakaroth Veteran Veteran

    Messages:
    272
    Likes Received:
    128
    First Language:
    English
    Dear @Quasi i have add soundsteps in my game, and i want change sound when hero's walk on water or bushes etc etc
    I have trying do that with standard Get Region ID stored in a variable, but it works based by grid not pixel so is not accurate, i need to use terrain ID or Region ID based by pixel, there's a way to do that?
    Best
     
  2. MajinSonic

    MajinSonic CupHog Member

    Messages:
    15
    Likes Received:
    9
    First Language:
    German
    Primarily Uses:
    N/A
    Hey there Quasi, 

    I'm using collision maps and I love it! Now its gonna be hard. I have a Map with more than one layer. 
    I'l show you:
     

    [​IMG]]

    You can see, there are 2 layers. So I have to use 2 different collision maps. (I'm using a parallax script as well)

     

    Above:[​IMG]

    Below:[​IMG]


    Last I'm working with a parallel process which have to change the parallax layer AND the collision map.

    So, if the Hero is on layer 0 it should load "Above". If the Hero is on Layer -1 it should load "below"
    (You can see the layer change events at the stairs. It activates the parallel Process)

     

    [​IMG]

    The Parallax Layer changes without any issue. 
    But the collisionmap doesn't change. (It also doesn't change if I use a "!" before the dataname)

    Do you think you can help me out?
    I'm using Version: 1.295

    Sincerly 

    MajinSonic
     
  3. deathsia

    deathsia Pegisister Veteran

    Messages:
    618
    Likes Received:
    52
    First Language:
    English
    YEEEEEESSSSSSS! I was waiting for this quasi!
     
  4. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    @Lakaroth I would recommend getting the center of the players collider. You can do this by using the .cx() and .cy() values. Example:
    $gamePlayer.cx();


    will return the center x position of the players collider ( in pixel coordinates ), then you would convert that to grid coordinates to see if you're on that region / terrain.


    You could also use my region event addon:


    http://quasixi.com/quasi-region-events/


    You can take a look at example 1, for how to use it to make a footstep sound. You can mix it with example 3 to make it more advanced so different characters play different footsteps.


    @MajinSonic Try updating to a newer version. If I remember correctly, there was a version where collision map switching wasn't working.


    @deathsia No problem!
     
    Lakaroth likes this.
  5. lonewolph

    lonewolph Veteran Veteran

    Messages:
    194
    Likes Received:
    14
    First Language:
    English
    Having a strange issue. My project was working fine but now that I came back to it, something is wrong with the movement with a Pathfind I have. My character hits the event, but then his speed seems like it gets set very slow until the event is over. Changing the character speed everywhere doesnt help. A week ago it was fine and i havent changed anything since
     
  6. trakpichu

    trakpichu Veteran Veteran

    Messages:
    44
    Likes Received:
    1
    First Language:
    English
    So, I am having an issue with the Region Lock when relating to events. Eh heh heh...

    So, rather than try and explain the issue, I decided to go ahead and just post a video of my issue!
     
     
  7. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    @lonewolph Make sure all of my plugins are up to date in your project.


    @trakpichu I think you're misunderstanding how to use the RegionLock plugin. You initially had it as "<region:1>", That means that event can ONLY move on region 1. If it's not on region 1 it can't be moved. As as the second half when you changed it to region 3. It will only be able to move on region 3. But in both cases, that event wasn't standing on region 1 or 3, therefore it couldn't be moved.
     
  8. trakpichu

    trakpichu Veteran Veteran

    Messages:
    44
    Likes Received:
    1
    First Language:
    English
    Oh my *insert god name here* I'm an idiot.

    Thanks for explaining that, I entirely misunderstood what it meant.
     
  9. EmperorZelos

    EmperorZelos Veteran Veteran

    Messages:
    63
    Likes Received:
    17
    First Language:
    Swedish
    Quasi, have you thought on adding a plugin where you can push the NPCs?
     
  10. Rastos78

    Rastos78 Blood Cloud Studio Veteran

    Messages:
    32
    Likes Received:
    39
    First Language:
    French
    Primarily Uses:
    RMMV
    Hello, I have difficulty with Java and I do not manage to make worked this function .canSee(charaId, shape, length).


    I tried of modified this._sightSettings.target = $gamePlayer; by this._sightSettings.target = $gameMap.event(sight[4]); without success.


    If you could help me please :  <sight:shape, size, switch(origin_event), origin_event_id, target_event_id, update? >


    Sorry for my English.


    Your plugin is very good!
     
    Last edited by a moderator: Jul 24, 2016
  11. Authumbla

    Authumbla Listen To My Soundcloud Fam? Veteran

    Messages:
    63
    Likes Received:
    24
    First Language:
    English
    Primarily Uses:
    N/A
    This plugin is an absolute godsend. However, I'm having trouble running the demo - it fails to load when I try playtesting it. Is this related to the lack of graphics in the tilesets?
     
  12. Jonath4nC

    Jonath4nC Kiwi Veteran

    Messages:
    54
    Likes Received:
    45
    Location:
    New Zealand
    First Language:
    English
    Hey, I'm sure this has been mentioned somewhere and I can't find it :/... but is there a way for events to be able to move randomly diagonally?
    (I'm trying to create a kind of AI at the moment :p ).

    And another thing, is there a way to get characters moving diagonally in a more isometric way than just straight diagonal? Like at a 30/60 degree angle? I know nothing when it comes to scripting, but I figured this might be quite difficult if the script relies on grid movement, but as yours relies on pixel movement, I was thinking is there a way to change the speed of the up/down movement to be slower than the left/right movement as the characters move diagonally? Maybe we could adjust the speed of the up-down movement and left/right movement separately ourselves like how we can adjust the diagonal speed? That way anyone can change the angle of the diagonal movement themselves?

    I don't know, just a thought and this is probably an impossible idea haha
     
  13. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    @Jonath4nC You just need to edit the moveRandom and change it up to add in diagonal directions (1, 3, 7, 9). Or if you're doing it through eventing, then just set your random variable between 1-8, and if it's 1, 3, 7, or 9 then move in that respective direction.


    As for the isometric movement, changing the vertical speed wouldn't work, because it's target location wouldn't change. So if you changed the vertical speed to be slower, all that would happen is that it would reach the X value before the Y, and then start moving upwards until its at the target Y value. To achieve an isometric movement, you don't change the x /y values to try to make it appear isometric, you just need to "rotate" their display. In mv that would be editing the .screenX() and .screenY() functions in the Game_CharacterBase class to use an isomteric formula instead of the cartesian formula. For extra information on that, this is a great read for learning how to do isometric:


    http://gamedevelopment.tutsplus.com/tutorials/creating-isometric-worlds-a-primer-for-game-developers--gamedev-6511
     
    Jonath4nC likes this.
  14. Jonath4nC

    Jonath4nC Kiwi Veteran

    Messages:
    54
    Likes Received:
    45
    Location:
    New Zealand
    First Language:
    English
    oh wow, ok that is awesome, thanks heaps! I wish I could understand all that though :/ ...I couldn't figure out how to change the .screenX/Y stuff. Would you do that in a separate plugin? Do you know of anyone who's done something like this already? I tried looking, but I all I found was something on youtube that the guy hasn't released yet. I assume you're rather busy to do this yourself? Perhaps I could do something for you in return? haha
     
  15. deathsia

    deathsia Pegisister Veteran

    Messages:
    618
    Likes Received:
    52
    First Language:
    English
    Okay so a program savy friend of mine looked over the plugin to help me out and spotted this:


    //-----------------------------------------------------------------------------
    // Game_Interpreter
    //
    // The interpreter for running event commands.

    var Alias_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
    Game_Interpreter.prototype.pluginCommand = function(command, args) {
    if (command.toLowerCase() === "qsight") {
    if (args[0].toLowerCase() === "setinvisible") {
    var charaId = Number(args[1]);
    var chara = charaId === 0 ? $gamePlayer : $gameMap.event(charaId);
    if (!chara) return;
    chara._invisible = args[2].toLowerCase() === "true";
    return;
    }
    }
    Alias_Game_Interpreter_pluginCommand.call(this, command, args);
    };


    Basically on line 87 you goofed up on line 87 by putting a 1 instead of a 2 in there. You may want to update the plugin so that everyone(including me) isn't wondering why its not working.


    Now this however exposed a nasty bug that according to my friend triggers on line 401. This bug however ONLY triggers if the NPC has sight of the player and attempts to lose sight by running into or through an event set to turn on the invisibility.


    [​IMG]
     
    Last edited by a moderator: Jul 30, 2016
  16. Authumbla

    Authumbla Listen To My Soundcloud Fam? Veteran

    Messages:
    63
    Likes Received:
    24
    First Language:
    English
    Primarily Uses:
    N/A
    I can't see why this wouldn't be the case, but this would work with Parallax maps, right? Since the idea is that the collision map is completely unrelated to the tiles placed on the ground?
     
  17. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    @deathsia Thanks for letting me know of that! As for line 401, you can comment / remove it ( don't remember what its for, so probably not important ) or you can also change it to:


    if (this._sight.base && this._sight.base._dr) return true;




    @Authumbla Yeah you can use this with parallax maps.
     
  18. deathsia

    deathsia Pegisister Veteran

    Messages:
    618
    Likes Received:
    52
    First Language:
    English
    Actually we tried to comment it out and it end up giving another error, I'll try to replace the line however with that.
     
  19. Authumbla

    Authumbla Listen To My Soundcloud Fam? Veteran

    Messages:
    63
    Likes Received:
    24
    First Language:
    English
    Primarily Uses:
    N/A
    @Quasi Thank you! I figured there wouldn't be a problem but wanted to make sure before progressing into a dead end.


    EDIT: Figured it out, never mind!
     
    Last edited by a moderator: Aug 1, 2016
  20. EmperorZelos

    EmperorZelos Veteran Veteran

    Messages:
    63
    Likes Received:
    17
    First Language:
    Swedish
    Would it be possible to get this to  work with Yanflys region restriction? I have tried and when your movement is on it bypasses yanflys
     

Share This Page