[Blizz ABS] Moving an enemy/boss to a certain spot of a room?

Started by Sin86, June 15, 2012, 11:31:33 am

Previous topic - Next topic

Sin86

I'm assuming this can be done with events although I do not know how to do it, that is why I posted this in the Event Request board.

Anyway, is there any kind of way on how you can manipulate an enemy you are fighting against to walk into the center of the room no matter if he's standing on the left, right, up down, etc areas of the room? It's basically like if you want him to execute an attack that requires him to lets say, a powerful strike but he has to be in the center of the room in order to do this special move or activate a switch or something.

G_G

You'd probably want to use F0's pathfinding script.
http://forum.chaos-project.com/index.php/topic,9784.0.html

Doesn't matter where the event is, if you just enter the coordinates, he'll move there. (Assuming there is a path of course)

Blizzard

Blizz-ABS has an integrated pathfinder (how else could the enemies follow you around?). Just look up the script calls in the manual.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Sin86

The pathfinder for Blizz ABS only applys to the player and not enemies and ForeverZero's isn't compatible with Blizz ABS, he says that it has possible issues with other scripts that involve a pathfinder.


Sin86

Yeah, thats what I read. It is talking about the player though and I've tried it out and I only know how to do it on the player but I would like to know how you can do it for enemies to move to the center and not the player.

Landith

QuoteCHARACTER can be any character, such as an event ($game_map.events[ID]). XCOORDINATE and YCOORDINATE are the coordinates of the map tile that you want to move to.

Sin86

Having a bit of a problem with it. I throw in an event with(event 1) to make event 2 move to a certain spot with this script.


"$game_player.path_target_x = ($game_map.events[2])" (without quotes)(game mape events would be CHARACTER) and I get this error message.

Wait, nevermind the error message, I made a typo on the script when I put the script in. However, once again it's only moving the player to the character, which is event 2. I'm trying to make event 2 move, not player move to event 2.

nathmatt

it would be
$game_map.events[2].path_target_x = the center x
$game_map.events[2].path_target_y = the center y
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Sin86

Now I get an error.


"NoMethodError occurred while running script.

undefined method `path_target_x=' for#<Game_Event:0x982a7a8>"


I set up 2 script calls, just like how I do on a player(which works on the player) and yet I got the error for the event. I did it like this.

$game_map.events[2].path_target_x = 5
$game_map.events[2].path_target_y = 10

Got the error and I even did it like this.

$game_map.events[2].path_target_x = the center 5
$game_map.events[2].path_target_y = the center 10

Now, if the event happens to be an enemy(which I want the event to be), I do not get the error message. Instead I get no error message but the enemy refuses to walk to those coordinates.

KK20

In a script call, use this:
e = $game_map.events[2]
$BlizzABS.AI.request_path(e, 5, 10)

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

ForeverZer0

Moved to Script Troubleshooting since where it belongs.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

KK20, you can do that now, too, if the topic is located in one of the boards you moderate. If you notice that a script is in the wrong section, feel free to move it. You should also move script topics into the database if they are using the template properly. You should then check if the topic appears in the script database index.

I forgot to send you a PM with some info about being a mod. I'll get right to it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Sin86

Quote from: KK20 on June 18, 2012, 08:18:04 pm
In a script call, use this:
e = $game_map.events[2]
$BlizzABS.AI.request_path(e, 5, 10)



Thank you, it worked!

However, now I am having another problem. I set the enemy to have a weapon trigger so that script can be called. The script calls fine however, after it reaches it's destination, I want the enemy to activate a switch and other commands and yet when the enemy goes there, nothing happens.

I tried to make an event using variables like how you would when pushing a box onto a switch, didn't work. Tried setting the event to "Event Touch"(both the default way and the trigger), didn't work either unless the player steps onto it, which isn't suppose to happen. Any way on how to make it activate a switch onto it's destination after the enemy reaches it?

Landith

Parallel Process to check for the event's map x and map y then when they equal that turn on a switch.

Spoiler: ShowHide

Sin86

I tried doing that too. It worked on crates and boxes but it did not work on the enemy.

It was almost the exact same way shown in the picture too.

Sin86

Is there any way on how I can get an enemy to trigger an event by simply walking on it? I mean we now got a way to set it to where it can walk to anywhere on the map where we want it to but is there a way on how I can make it walk to a certain spot, then an event will trigger? I still tried the variable method like Landith provided and it still didn't work.

I tried this method too.

($game_map.events[1].x == $game_map.events[3].x) and ($game_map.events[1].y == $game_map.events[3].y)


As a parallel process(1 being the enemy, 3 being the event to where it steps on, something should trigger) and it still did not work. Both methods work fine with normal events touching other normal events but the enemy event doesn't seem to be recognized. Any help?

KK20

Are you using pixel movement? When I set mine to zero, I was able to use the enemy's (x,y) values to trigger events at certain (x,y) positions. But when I changed it to a one, the enemy couldn't trigger it--this is due to the enemy's coordinates being (10,20) and not logical (5,10).

If you are not using pixel movement, then I have no idea why your enemy is not triggering the events.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sin86

Thank you so much for clarifying that to me. Yes I was using Pixel Movement and that is probably why it didn't work and like you said, I switched it to 0 and it worked well.