Main Menu

Interesting Script [assumed impossable (gave up on requesting it)]

Started by fadark, March 31, 2007, 09:43:01 PM

0 Members and 1 Guest are viewing this topic.

fadark

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!

just so everyone knows, im 15 years old.

Rune

Wha?

You mean when one event touches another (specific events obviously) something happens... like they both disappear?
Sincerely,
Your conscience.

&&&&&&&&&&&&&

#2
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.
&&&&&&&&&&&&&&&&

fadark

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.

just so everyone knows, im 15 years old.

fadark

hello? any good scripters out there?

just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.

Kokowam

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?

fadark

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

just so everyone knows, im 15 years old.

Kokowam

Couldn't the bullet be phasing? Since it's going to be going over everything?

fadark


just so everyone knows, im 15 years old.

fadark

#10
ok, if you need to use events and scripts that fine, tell me when your done

just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.

Kokowam

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?

fadark

too many events in 1 map created alot of lag and my game is already having lag

just so everyone knows, im 15 years old.

fadark

#15
just checking up on ya, kipe. everything go'n well?

[edit] hello? kipe?

[edit] kipe? are you there? hello? anyone there?

just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.

Rune

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
Sincerely,
Your conscience.

Kokowam

Yeah! But then, he said too many events = bad. Or... You could just do a "Collision = destroy" but he won't listen :P

Rune

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?
Sincerely,
Your conscience.

Kokowam

That would be change actor, but you would still need to use move event so probably more eventing doing that.

Rune

Hmm... okay then... just a thought...
Sincerely,
Your conscience.

fadark

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.

just so everyone knows, im 15 years old.

Kokowam

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.

fadark

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.

just so everyone knows, im 15 years old.