Quasi Movement

● ARCHIVED · READ-ONLY
Started by Quxios 657 posts Page 27 of 33 View original ↗
  1. 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. 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:
     

    Spoiler
    WE_MORUv43uBus9A5yHmhZfoE.png]

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

     

    Spoiler
    Above:vs9Mm26bG-OvZ5Ga1k3n9hjFD.png

    Below:aZLI5j1hQO_ywfn4h_XnKgbIR.png


    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)

     

    Spoiler
    kX69hPjaa289lGU9jQ90wZ_T-.png

    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. Quasi said:
    I looked into that region 100, and higher. And they worked for me.


    Some updates:
    Movement 1.299


    https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiMovement.js

    • Added an .id property to colliders
    • Removed a few functions I hadn't noticed I left inside from long ago
    • Fixed the .positionChanged() function. ( This will fix Region Events addon from triggering common events with action trigger, when it should be only with touch trigger )
    • Few changes to the Sprite_Collider and tempColliders to use the .id property



    Sight 1.08


    https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiSight.js

    • Rewrote some parts / removed some lines.
    • Added plugin command "qsight setInvisible [charaID] [true or false]
    • Added ._invisible property to characters. If character is invisible, the character can't be seen
    • Added .canSee(charaId, shape, length) function to characters. You can use this function to see if the player can see an event, or if an event can see another event

    YEEEEEESSSSSSS! I was waiting for this quasi!
  4. @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!
  5. 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. 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. @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. Quasi said:
    @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.

    Oh my *insert god name here* I'm an idiot.

    Thanks for explaining that, I entirely misunderstood what it meant.
  9. Quasi, have you thought on adding a plugin where you can push the NPCs?
  10. Quasi said:
    I looked into that region 100, and higher. And they worked for me.


    Some updates:
    Movement 1.299


    https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiMovement.js

    • Added an .id property to colliders
    • Removed a few functions I hadn't noticed I left inside from long ago
    • Fixed the .positionChanged() function. ( This will fix Region Events addon from triggering common events with action trigger, when it should be only with touch trigger )
    • Few changes to the Sprite_Collider and tempColliders to use the .id property



    Sight 1.08


    https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiSight.js

    • Rewrote some parts / removed some lines.
    • Added plugin command "qsight setInvisible [charaID] [true or false]
    • Added ._invisible property to characters. If character is invisible, the character can't be seen
    • Added .canSee(charaId, shape, length) function to characters. You can use this function to see if the player can see an event, or if an event can see another event

    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!
  11. 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. 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. @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
  14. 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. 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.


    d9c1e3d9da.jpg
  16. 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. @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. 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. @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!
  20. 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