|
Post by Maindric Games © on Jun 5, 2007 20:07:51 GMT -5
I have been messing around with RPGM2, and I just want to know how I can make an event do something when it reaches the leader. E.I. I have a slime chasing the party leader, and I want him to attack him when he reaches him, but all he does is circle him.
Also, how do I make a VFX that when it touches an event, it makes something else happen. (I have looked through ALL of the flags, variables, kind of studdied them, and I cannot find one for this cuase...)
Can you please help me?
|
|
|
Post by realitybites on Jun 5, 2007 20:48:31 GMT -5
For the first part you need to make a custom AI movement, more like constantly repeating 1 step depending on the events direction. If you would like I can go into more detail. As I know how it would work, also, for your second question could you be more specific?
|
|
|
Post by Maindric Games © on Jun 5, 2007 22:01:01 GMT -5
Ok, I am working on a custom battle system, so for the first question, i would greatly appreaciate you explaining a little bit more. For the second one, I want it so that when I make the player attack, I want the sword when it touches the monster to deal damage to it. I already have the scripting in mind, I just gotta make it so that the VFX CAUSES the script to happen...
|
|
|
Post by realitybites on Jun 6, 2007 10:18:34 GMT -5
Ok well there are many ways to make a movement system, the way I would do it, is simply these two scripts.
Use the lock variable method:
[Lock/Variable] SBR:Lock/EvtLD=on(<---doesn't have to be that, you can use any flag if youd like..) other:wait:1F SBE Data:Flag:Lock/EvtLD=off
You need this for multiple moving events. now for the actual movement script.
[AI MOVE]
000 Script Branch Repeat:flag fixed off=off 001 Event:Movement:Direction Change:face leader 5F 002 other:wait:20F(this is your wait for each step) 003 Script:Call:[Lock/Evt] 004 Event:Control:Event Info Load 005 Sort:Event Dir 006 Apply if 0 007 Event Movement: E 1 step 008 To End 009 Apply if 1 010 Event Movement SE 1 step 011 To End 012 Apply if 2 013 Event:movement S 1 step 014 To End 015 Apply if 3 016 Event:Movement SW 1 step 017 To End 018 Apply if 4 019 Event Movement W 1 step 020 To End 021 Apply if 5 022 Event:Movement NW 1 step 023 To End 024 Apply if 6 025 Event:Movement N 1 step 026 To End 027 Apply if 7 028 Event:Movement NE 1 step 029 Script Branch End
As for checking if there in front, thats something ya gotta try for yourself.
|
|
|
Post by NASH7777 on Jun 6, 2007 10:21:45 GMT -5
^However the above method allows for the event to get "stuck" if it encounters a wall.
There's a way to get around this.
Apply together Call BlahScript Event: To Leader 5F
Now in the Blah script, have it do a distance check, if within range, your case 1, have it attack or duplicate and remove to another event, or w-e you need it to do.
|
|
|
Post by realitybites on Jun 6, 2007 10:25:42 GMT -5
Yeah, I forgot to mention that if it hits a wall, the event "locks" Nash's Idea could work to.
|
|
|
Post by Maindric Games © on Jun 6, 2007 11:12:27 GMT -5
Ok thank you, I shall mess around with this a little bit, and hopefiully it will work. Thanks a bunch. =D
|
|
|
Post by Maindric Games © on Jun 7, 2007 14:53:16 GMT -5
Ok, I have been messing around alot on this, and been trying some script options I still am not formiliar with fully. I did a little bit of research online, but I still cannot find out how to do a distance check. Yes, I am still very new to scripting, I had this thing for almost a year, but I took 2 or 3 very long breaks, so I am still a bit fuzzy on scripting.....
|
|
|
Post by Rodak on Jun 7, 2007 16:01:06 GMT -5
You could always use "jump point" events which invoke the float command and move the party. These would only work for specific jumps from one predefined spot to another, but would be easy. A distance check is no more than loading the party's coordinates, storing them to a couple variables, and then loading the event's coordinates and storing them to another couple variables, then subtracting! if both numbers are very low- the party and event are near each other. If both numbers are very high, the party and event are far apart. That is very general, and will take experimentation to polish, but should get you started. Good luck with it. Peace.
|
|
|
Post by realitybites on Jun 7, 2007 22:02:08 GMT -5
well for a distance check its like this.
Data Game Info Load Sort[Party Dir] Apply if 0 E X1=Party X+1 E Y1=Party Y+0 E X2=Party X+-1 E Y2=Party Y+0
thats for east, the rest should be self explanatory.
|
|
|
Post by Rodak on Jun 8, 2007 4:34:38 GMT -5
well for a distance check its like this. Data Game Info Load Sort[Party Dir] Apply if 0 E X1=Party X+1 E Y1=Party Y+0 E X2=Party X+-1 E Y2=Party Y+0 thats for east, the rest should be self explanatory. Is it just me, or does that look useless? What is the E? Event, maybe? Are these Party X things Variables you renamed, or the ones loaded by the command?? That seems Incomplete!! I have very little idea what you mean by it. Please elaborate if you want that to be useful. And... Where is the distance check calculation??
|
|
|
Post by realitybites on Jun 8, 2007 9:25:23 GMT -5
|
|
|
Post by Rodak on Jun 8, 2007 11:09:18 GMT -5
Oh. I thought you were offering that as a distance check script you wrote! I should have recognized Nash's Pseudo-Shorthand Abbreviations!
|
|
|
Post by realitybites on Jun 8, 2007 11:11:57 GMT -5
ha ha yeah its his check script. Mine would be a little easier to understand, variable wise. ;-)
|
|
|
Post by Maindric Games © on Jun 8, 2007 16:14:44 GMT -5
Ok, I thought it had something to do with those variables, but I was not fully sure. Thanks, I shall work on it when I get to use my PS2 again. (I am at my Mom's now, and I left the PS2 and Xbox there..)
|
|
|
Post by NASH7777 on Jun 9, 2007 0:37:44 GMT -5
A distance check basically compares the xyz of one event to the xyz of something else. Essentially, x1-x2 ; y1-y2 ; z1-z2 then depending if it's negative or positive you'll know if there to the left or right, up or down, OR above or below from one another. Then I also do this if the distance x is greater than distance y, I make distance x the full distance, and vice versa.
This is a 2d grid distance check not to be confused with a true distance check which uses square roots or a 3d distance check which adds in the 3rd axis, keep in mind if you want to use the 3rd axis you'll have to run it mod 16 ( % 16)
|
|
|
Post by Maindric Games © on Jun 9, 2007 19:05:08 GMT -5
Alright, also, if I am to talk toyou on MSN, what is your e-mail? Mine is Darkend12@hotmail.com, soo, yeah..
|
|