The Daily Click ::. Forums ::. Klik Coding Help ::. Chunks flying off enemies
 

Post Reply  Post Oekaki 
 

Posted By Message

aaron_brammer



Registered
  14/05/2003
Points
  1299
30th June, 2003 at 21:45:21 -

hey, anyone know how to get a chunk of gut to jump out of an enemy (with frog like motion) in a random direction when hit? Much like the chunks in aliens survival.

 
heyo

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
30th June, 2003 at 23:18:55 -

I've never played aliens survival. But to get a chunk out of something. You can use the paste image into background action, with a circle shape the same colour as the background. The only prob is the thing you are ripping a chunk out of has to be a background, not an active. I don't know how to do it with an active, unless the body is seperated into differant objects.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Rycon



Registered
  20/09/2002
Points
  996
1st July, 2003 at 22:32:56 -

Im guessing you just want chunks of guts to fly off your enemie when they get hit? Easy. First just make your chunk active object. (All you gotta do is make a bloody peice of skin, and spin it in 8 directions clockwise so it looks like its flying) Now, make a Always condition, and under your chunk, do: Set Y Position of ("chunk") + Value A of ("Chunk")

Then make a Every 10 MILIseconds condition. And under chunks put: Add 1 to Value A. DONE!

All you have to do now, is when he gets hit. Make his body shoot the chunk in random directions (All directions facing up) and little chunks will go flying across your screen. If you can remember this code, expermint with it, you can go a very long ways.

 
We are the music makers, we are the dreamers of dreams...

Frank D



Registered
  01/07/2003
Points
  9
2nd July, 2003 at 01:54:44 -

you would have to make each chunk active and then use alterable values to position the chunks when then fly off.

 
Yo

Rycon



Registered
  20/09/2002
Points
  996
2nd July, 2003 at 12:00:27 -

k uh.. no?

"All you have to do now, is when he gets hit. Make his body shoot the chunk in random directions."

1 active chunk.

 
We are the music makers, we are the dreamers of dreams...

aaron_brammer



Registered
  14/05/2003
Points
  1299
2nd July, 2003 at 20:48:51 -

thing is i want the chunk to stop and sit on the ground for the rest of the game.

 
heyo

Rycon



Registered
  20/09/2002
Points
  996
2nd July, 2003 at 22:39:07 -

Chunk Collides with backdrop = Stop/Paste into background.

Done

 
We are the music makers, we are the dreamers of dreams...

aaron_brammer



Registered
  14/05/2003
Points
  1299
2nd July, 2003 at 22:51:32 -

hey, if it stops when colliding with backdrop, wouldnt it simply not move, i may aswell make a static chunk and have created relative to my characters.

 
heyo

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
3rd July, 2003 at 00:15:20 -

Yes, but then that's one active object taken up. And every active object burns memory. Btw Rycoon forgot to add, destroy the chunk after pasting into background otherwise it's no differant to what you were suggesting - Aaron.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Teh Keelor



Registered
  03/07/2003
Points
  333
4th July, 2003 at 16:30:15 -

Okay, this tutorial worked out fine. i got it to work. ill use this alot now

however, say instead of chunks, im using this on bullet shells or rocks or something. how do i get them to hit bounce a few times when they hit the floor?

 
Image

"Don't push the Mario man!"

Rycon



Registered
  20/09/2002
Points
  996
4th July, 2003 at 22:33:21 -

Aaron: Andy is right, having a chunk sit on the ground, so you can like shoot it and move it or somthing, will burn alot of memory if you dont limit there amount. You can use the code posted below to make them bounce, and then when they have bounced enough, make them just stop, and have code to move them when they get hit or somthing. But you will need to make sure to turn off the Always code (above) its a big mess, but if your willing to do it, its very possible. I recomend you just let em bounce a few times and fall off the screen.


Andy: Its Rycon, not Rycoon (Its all good, just cant stand being called that ) And yes your right, thanx for catchin that.

When the item hits a backdrop or somthing you want to bounce, do this:

Teh Keelor:

Rock Collides with background: Set alterable value A to (Value A of ("Rock") -9) * -1

Where the -9 part is how much its gonna NOT bounce as much, if it were -1 it would bounce a WHOLE lot of times, it may even bounce higher from its first drop if you drop it from a tall spot. Also, you can subract from its Value B when it hits somthing, and test to see if value B is less then a certain number, so that it doesent bounce forever, it just falls through the landscape. It also wont detect things from left or right, wich can give a cool effect, but if you dont want it to pass through certain things, simply do

If rock is OVERLAPPING, instead of colliding.

This is super easy, dont let all this mumbo jumbo psyc you out, just put in that code above and your done.


Omg this is my longest post ever, I cant stand long posts. lol :|

 
We are the music makers, we are the dreamers of dreams...

Rycon



Registered
  20/09/2002
Points
  996
4th July, 2003 at 22:38:49 -

Ack I just realized that my post is confuzing. Summary:

-9 part = The amount of bounce its gonna take away each time. -1 would bounce really high, -12 would probly be bearly come back up.

Adding to a counter (Value B): Just counts the amount of times its bounced, so you can limit it.

It wont bounce on things that are |flat| walls, so do Overlapping instead of Colliding for that.


Sorry, please tell me if your having trouble.

 
We are the music makers, we are the dreamers of dreams...

Teh Keelor



Registered
  03/07/2003
Points
  333
5th July, 2003 at 00:02:46 -

nope, works just fine. thanks

 
Image

"Don't push the Mario man!"

Rycon



Registered
  20/09/2002
Points
  996
5th July, 2003 at 09:35:07 -



 
We are the music makers, we are the dreamers of dreams...
   

Post Reply



 



Advertisement

Worth A Click