ah, I also use Move Route Extras but for some reason they never work within tool page stuff, even if they're called by a common event. Works fine in any event outside of that though.
CROSS ENGINE: Combining Chrono Engine with Altimit Movement
JS Plugin Releases (RMMV)If you call a function that normally goes in a move route from the event page instead, or a common event page, you need to change this to this.character(0)
yeah, it doesn't move the character either way. Only thing that happens is the tool pose plays. I've tried -1 and 0 both inside and outside of a move route call. Testing trying to move it to a specific point before I spend a day trying to figure out how to move down 2 from any spot.
I just told you if you're using a move route then it's just "this", with "this" being the object of the movement route.
this.character(0) refers to the object where the code is called from), this.character(-1) is the player but those are object references you use on an event page outside a move route.
In your movement route you're already declaring the player as the object for the function to act on. If you do not use a movement route then the object is the Game Interpreter itself which movement functions don't work on, so you need to define this.character(eventNumber), or 0, or -1 so the Game Interpreter knows which event you actually want to move.
Looking through your replies and you didn't state this anywhere, I mean I appreciate the help but in general you're incredibly unclear. "this.jump_to(xy)" moves the character but doesn't trigger the event it lands on
Could you post your jump tool event page again?
Hello there, I want to use this plugin for a project, but the demo has graphical issues. Character attack animations do not work, and the sprites seem to be labeled incorrectly which make the 8 directional movement along with others glitch out. I hoped there would be an update as I tried using this a year ago but it's still the same. Can you possibly update the errors, so it works as intended?
I finally got around to trying this out. It did not work for me, but I was still able to find a solution because of it. That .battler() function was exactly what I needed.
var battler = this.battler(); if(battler.isStateAffected(4)){ this.act(73) };
I tacked that into the front of my NPC's custom move route and it ticks poison damage like a charm. Effectively, it gets the NPC to basically damage itself with a 0 range on-user projectile to simulate a DOT tick. Thanks for the help!
If you post this as a script call right after the player lands from jumping it will activate any event the player happens to be standing on:
JavaScript:
$gameMap.refresh();
var radius = 0
var mapEv = $gameMap.events();
var listEv = mapEv.length;
var player = $gamePlayer;
for (var i = 0; (i < $gameMap.events().length + 1); i++) {
var thatEv = mapEv[i];
if (!!$gameMap.event(i) && $gameMap.event(i) != player) {
if (Math.round(Math.hypot($gameMap.event(i).x - player.x, $gameMap.event(i).y - player.y)) <= radius) {
$gameMap.event(i).start();
} } };
That "var radius = 0" part is the range of activation. If you want some sort of splash activation you can change that number. For example, a 2 would activate the event you landed on and also all events within a 2 tile radius.
If you're scripting inside a move route just put it all together as one line and paste it into your move route as a script call:
JavaScript:
$gameMap.refresh(); var radius = 0; var mapEv = $gameMap.events(); var listEv = mapEv.length; var player = $gamePlayer; for (var i = 0; (i < $gameMap.events().length + 1); i++) { var thatEv = mapEv[i]; if (!!$gameMap.event(i) && $gameMap.event(i) != player) { if (Math.round(Math.hypot($gameMap.event(i).x - player.x, $gameMap.event(i).y - player.y)) <= radius) { $gameMap.event(i).start(); } } };
P.S.
- Keep in mind that when working with move route scripting the Event's movement option for "Frequency" (Freq: under Speed🙂 will effect how quickly your scripts fire off just like it does with an event's movements.
You implemented something wrong because it does work. As I told DTurtle, I do in fact test the scripts I post before posting them. Also, my script checks for ALL status and buffs and will clear them up after so many frames. Just those two lines is for poison damage.
As an aside, I (and RCXGaming) recently fixed the hookshot to bounce against walls as defined by either a region ID or terrain tag
Put this script in a new plugin file at the end of your project's plugin list. Change where it says 100 to the region ID of your wall.
Code:
// altered hookshot so it retracts faster than it flies out.
Game_Character.prototype.processMoveCommandTool = function(command) {
if (this._tool.boomerang[0]) {
if (this._tool.boomerang[1] > 0) {
this._tool.boomerang[1]--;
this.moveForward();
} else {
this.moveTowardCharacter(this._tool.user);
this._tool.forcingMove = 2;
};
} else if (this._tool.hookshot.enabled) {
if($gameMap.regionId(this.x+.5,this.y+.5) === 100){
this.hookShotTink();
this.erase();
this.moveTowardCharacter(this._tool.user);
this._tool.forcingMove = 2;
}
if (!this._tool.hookshot.locked) {
this._directionFix = true;
if (this._tool.hookshot.range > 0) {
this._tool.hookshot.range--;
this.moveForward();
} else {
if (this._tool.forcingMove != 2)
{
//first time we change to retracting, increase speed
this._moveSpeed+=1;
}
this.moveTowardCharacter(this._tool.user);
this._tool.forcingMove = 2;
};
} else {
this._tool.forcingMove = 2;
};
};
};
If you want to use terrain tag instead change
Code:
$gameMap.regionId(this.x+.5,this.y+.5)
Code:
$gameMap.terrainTag(this.x+.5,this.y+.5)
Use it with the below hookshot settings
The code was fine, I was just saying it didn't work for me. I've got a lot of custom code flying around my project on top of various plugins. I didn't see any reason it shouldn't, it just wasn't firing off for me on my project for whatever reason. I saw what you were going for, though, and learned something new out of it that solved my problem so it all worked out in the end. Much obliged! o7
EDIT: Like, seriously thank you. I'd been at this particular issue a while and you saved me a lot of time.
It's fine. I just updated the script again because there was a bug: enemies that died from poison damage weren't being erased, toggling their self switch, and dropping treasure. This should fix that.
Edit: Updated again with a better damage function
Code:
for (var i = 0; i < $gameMap._battlersOnScreen.length; i++) {
char = $gameMap._battlersOnScreen[i];
battler = $gameMap._battlersOnScreen[i].battler();
if(battler.isStateAffected(4)){battler.gainHp(-Math.floor(battler.mhp*.10));
if(battler.isDead() && battler.isEnemy()){char.setDeadEnemy(char, battler);}}
battler.startDamagePopup();
battler.updateStateTurns(); battler.updateBuffTurns();
battler.removeStatesAuto(1); battler.removeStatesAuto(2);}
Ok, I think I know what your issue is: BattlersOnScreen wasn't being initialized in ABS mode unless you force it, but that has its own issues, in that it will either not affect enemies outside of when you force it, or crash the game if you refresh it with a new screen of enemies but an enemy from the previous screen is still affected by a state.
Try this instead, it'll sample the player and every enemy on the map
Code:
for (var i = 0; i < $gameMap.allEnemiesOnMap().length; i++) {
char = $gameMap.allEnemiesOnMap()[i];
battler = $gameMap.allEnemiesOnMap()[i].battler();
if(battler.isStateAffected(4)){battler.gainHp(-Math.floor(battler.mhp*.10));
if(battler.isDead() && battler.isEnemy()){char.setDeadEnemy(char, battler);}}
battler.startDamagePopup();
battler.updateStateTurns(); battler.updateBuffTurns();
battler.removeStatesAuto(1); battler.removeStatesAuto(2);}
JavaScript:
player = $gameMap.players()[0].battler();
if(player.isStateAffected(4)){player.gainHp(-Math.floor(player.mhp*.10));}
player.startDamagePopup();
player.updateStateTurns(); player.updateBuffTurns();
player.removeStatesAuto(1); player.removeStatesAuto(2);
Hello everyone, I just want to ask you something when I test the game by using guns, when I equipped as a gun, It's good thing I can shoot while I walk, but it stop like 1 second and then move, it's break attack-move break attack-move break attack-move, I need to make this character can walk and run while he shooting without break.
Also, is there way to make a gun 4 directions? I just saw there a megagun only 2 direction (left and right).
Also, is there way to make a gun 4 directions? I just saw there a megagun only 2 direction (left and right).
There is a thread about gun tools here:
Automatic Firearms. Chrono Engine ABS
Hello, folks. I was wondering if there's a way to make automatic firearms on Chrono Engine ABS Mode, sort of like holding down the button (Z in this case) and the weapon keeps shooting. I know this would make it unable to use charged skills, but I don't mind. This is for a ranger sort of hero...
forums.rpgmakerweb.com
I did the same thing, but it keeps break 1 second and walk.
This script I found move route:
this.locate(this.user().x+Math.sign(this.user()._zoomData[0])*0.8,this.user().y-0.6); this._direction=5+Math.sign(this.user()._zoomData[0]);this.rLoc(20*this.user()._zoomData[0],0)
This script I found move route:
this.locate(this.user().x+Math.sign(this.user()._zoomData[0])*0.8,this.user().y-0.6); this._direction=5+Math.sign(this.user()._zoomData[0]);this.rLoc(20*this.user()._zoomData[0],0)
Did you try setting the pose duration to 0? From that thread:
I did like I said, it still break 1 sec and walk
Could you try changing the tool cooldown duration to 0?
It goes faster, but still break and walk.
Edit: maybe there's something we can modify this event id 73, but I don't know how.
Edit: maybe there's something we can modify this event id 73, but I don't know how.
Original thread: https://forums.rpgmakerweb.com/threads/cross-engine-combining-chrono-engine-with-altimit-movement.122622/