The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: fadark on March 31, 2007, 09:43:01 PM

Title: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: fadark on March 31, 2007, 09:43:01 PM
I need a script that makes it so when a spesific event touches a different spesific event, the a spesific variable changes value. can someone make me or give me that script?


Thanks if you can help!
Title: Re: interesting script [request]
Post by: Rune on March 31, 2007, 10:33:34 PM
Wha?

You mean when one event touches another (specific events obviously) something happens... like they both disappear?
Title: Re: interesting script [request]
Post by: &&&&&&&&&&&&& on March 31, 2007, 10:49:35 PM
easy... if you want one to move and the other stays in place that is.

Make two variables named anything you want. It's best to name them X and Y.

v= variable

Make it so that whenever the even moves up add 1 to vX. When is goes down subtraced one from vX. When it goes left add 1 to vY and take from it if it goes to the right.

       ^ +1 x
+1 y <   > -1 y
         \/ -1 x
ok now set so that the event activates when the xy = the events placement.
Title: Re: interesting script [request]
Post by: fadark on March 31, 2007, 11:15:09 PM
I see what your saying. but that wont work because im making a shooting game.

when you shoot: an event (the bullet) shoots out of your hero.

I need to make it so when the bullet (spesific event #1) hits the enemy (spesific event #2) the enemy's hp (spesific variable) changes value (goes down).

when the variable is 0 or less, the enemy (spesific event #2) dies.

and I can do that by making it so when the variable is 0 or less, a switch activates that erases the enemy (spesific event #2)

but i still need a script that makes it so when the bullet (spesific event #1) hits the enemy (spesific event #2) the enemy's hp (spesific variable) goes down

I need a script because I doubt you can do this with events if the enemy in moving, if someone can do it with events, that fine too but I doubt its possable.
Title: Re: Interesting Script [Request]
Post by: fadark on April 01, 2007, 03:51:15 PM
hello? any good scripters out there?
Title: Re: Interesting Script [Request]
Post by: fadark on April 03, 2007, 11:44:19 AM
ok thanks, great
Title: Re: Interesting Script [Request]
Post by: Kokowam on April 03, 2007, 11:51:28 AM
Why not set two variables, BulletX and BulletY, which will be set to the bullets coordinates? Then, when BulletX =EnemyX and Bullet Y = EnemyY, a common event will trigger the HP reduction?
Title: Re: Interesting Script [Request]
Post by: fadark on April 03, 2007, 08:28:21 PM
because one of the events would have to be phasing, and i cant have that.
ill wait for kipe's events-chain that he's working on
Title: Re: Interesting Script [Request]
Post by: Kokowam on April 03, 2007, 08:48:03 PM
Couldn't the bullet be phasing? Since it's going to be going over everything?
Title: Re: Interesting Script [Request]
Post by: fadark on April 03, 2007, 10:35:41 PM
thanks kipe ;) ;D :D 8) :D
Title: Re: Interesting Script [Request]
Post by: fadark on April 04, 2007, 11:49:11 AM
ok, if you need to use events and scripts that fine, tell me when your done
Title: Re: Interesting Script [Request]
Post by: fadark on April 04, 2007, 09:58:08 PM
how is the eventing going?
Title: Re: Interesting Script [Request]
Post by: fadark on April 08, 2007, 10:19:58 PM
done yet?
Title: Re: Interesting Script [Request]
Post by: Kokowam on April 08, 2007, 10:51:50 PM
Well, why not make the bullet phasing and then when making things such as bulidings, you make the building an event so when collision, the bullet is destroyed or whatever?
Title: Re: Interesting Script [Request]
Post by: fadark on April 08, 2007, 11:08:34 PM
too many events in 1 map created alot of lag and my game is already having lag
Title: Re: Interesting Script [Request]
Post by: fadark on April 09, 2007, 03:58:32 AM
just checking up on ya, kipe. everything go'n well?

[edit] hello? kipe?

[edit] kipe? are you there? hello? anyone there?
Title: Re: Interesting Script [Request]
Post by: fadark on April 11, 2007, 07:51:53 PM
kipe, is it finished?
Title: Re: Interesting Script [Request]
Post by: Rune on April 11, 2007, 09:36:40 PM
Quote from: mastermoo420 on April 03, 2007, 11:51:28 AM
Why not set two variables, BulletX and BulletY, which will be set to the bullets coordinates? Then, when BulletX =EnemyX and Bullet Y = EnemyY, a common event will trigger the HP reduction?

Couldn't you do that with the bullet and the wall? O_o
Title: Re: Interesting Script [Request]
Post by: Kokowam on April 11, 2007, 09:42:42 PM
Yeah! But then, he said too many events = bad. Or... You could just do a "Collision = destroy" but he won't listen :P
Title: Re: Interesting Script [Request]
Post by: Rune on April 11, 2007, 09:50:30 PM
Is there a way you could swap the character with the bullet? So you are contantly going forward... and if you hit a building (collision event) the bullet gets destroyed and you swap character back to your main hero?
Title: Re: Interesting Script [Request]
Post by: Kokowam on April 11, 2007, 10:07:52 PM
That would be change actor, but you would still need to use move event so probably more eventing doing that.
Title: Re: Interesting Script [Request]
Post by: Rune on April 11, 2007, 10:22:32 PM
Hmm... okay then... just a thought...
Title: Re: Interesting Script [Request]
Post by: fadark on April 12, 2007, 01:41:31 AM
QuoteYeah! But then, he said too many events = bad. Or... You could just do a "Collision = destroy" but he won't listen Tongue
how would i do that? just because the enemy collides with the bullet doesn't mean the the bullet or the enemy will activate.
Title: Re: Interesting Script [Request]
Post by: Kokowam on April 12, 2007, 09:18:50 PM
Errr.... Never mind. XD You'll have to work with variables and a lot of it, not using scripts. BulletX, BulletY, TargetX, and TargetY. When BulletX = TargetX, check if BulletY = TargetY. Actually, that won't work. If you do that, you'll need only a set amount of things the bullet can collide with and a parallel process to change Target1X/Target1Y, Target2X/Target2Y, etc. constantly. Your choice.
Title: Re: Interesting Script [Request]
Post by: fadark on April 12, 2007, 11:43:49 PM
thats why i dont think this is possble with 2 moving events that neither of them are phasing. which is why this topic is in the scrpits section. but i will wait on kipe because maybe he is a genious and knows a way.
Title: Re: Interesting Script [Request]
Post by: fadark on April 15, 2007, 05:03:54 PM
*ahem*
Title: Re: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: fadark on May 05, 2007, 09:00:35 PM
he never came for me :'( this is is the most important script/event system in the whole game. but if i cant get it, ill just abandan the project. no big deal.

i switched [request] to [assumed impossable (gave up on requesting it)] in the topic title
Title: Re: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: :) on May 05, 2007, 09:05:38 PM
ask Irockman1 in a PM I did something like this for his soccer game.
(just the part where two events touch one another and something happens)
Title: Re: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: fadark on May 05, 2007, 11:25:16 PM
cool! thanks! why didn't ya say so?
Title: Re: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: Lackluster on May 05, 2007, 11:51:51 PM
o_O Mr.Mo's ABS has a ranged weapon function...why not just use that? D:
Title: Re: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: fadark on May 06, 2007, 12:40:25 AM
ill try that out too, thanks!
Title: Re: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: Rune on May 07, 2007, 08:57:29 AM
Heh... you beat me to it... I just discovered that... It rocks :D
Title: Re: Interesting Script [assumed impossable (gave up on requesting it)]
Post by: fadark on May 07, 2007, 09:19:57 PM
QuoteHeh... you beat me to it... I just discovered that... It rocks
lol

i found blizzard's abs too. it looks nice but generaly not as good as mr.mo's abs. but for my game, i think it would work better because the weapons have range. which is good, since the weapons in the game i am making are all (but 1) guns. ;)