The Daily Click ::. Forums ::. Klik Coding Help ::. Newbie problem
 

Post Reply  Post Oekaki 
 

Posted By Message

tobbe



Registered
  26/05/2003
Points
  41
4th October, 2005 at 16:03:08 -

Ran into a problem, and I would appreciate any help you can give me. I am doing a zombie shooter, and I want the zombies do "bleed". I can do that, though the problem is when I want several different kinds of splatter, so when I "paste into background", it will be one of three different splatters. I used one object, with 3 different animations. Then I used internal value A, "random (3)... and then
Value A=1 -----show animation 1
Value A=2 -----show animation 2
Value A=3 -----show animation 3

Then for all "animation 1/2/3 is finished" ------set value A to 0, paste into background
For some reason, this doesnt work...all I get is that the first animation is alwaysed used.
anyone know why?

 
pixel artist

Dave Matthew (Jester Gaming)



Registered
  09/07/2004
Points
  148
4th October, 2005 at 16:37:41 -

this won't solve the problem I guess but random(3) gives you 0,1 or 2. You might want to change that.

 
n/a

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
4th October, 2005 at 19:17:33 -

It should work. I would check the order of your events.

 
http://www.klik-me.com

Mr Icekirby



Registered
  18/12/2003
Points
  846
4th October, 2005 at 21:18:52 -

Try a group of events and then deactivate when unneeded.

 
Mr Icekirby says so!
OBEY ME!

tobbe



Registered
  26/05/2003
Points
  41
5th October, 2005 at 05:39:13 -

Dave: Ahh...that might be the case, I thought random (3) gave 1,2,3....I'll try to change it and see what happens

 
pixel artist

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
5th October, 2005 at 05:46:26 -

An easier method may be to use an active as the blood splatter, with every direction as a differant splatter. This way you can just say "Set direction to random (3)+1", paste into background.

Image Edited by the Author.

 
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

Tiles

Possibly Insane

Registered
  06/12/2002
Points
  2339

GOTM 3TH PLACE WINNER - JANUARY 2010
5th October, 2005 at 05:59:18 -

It also makes some trouble with animation is over and paste into background. It pastes the picture AFTER the current one. Maybe this is your trouble here. Because it switches back to first animation, and pastes then ...

Lets say your animation is 9 frames long. Now try this:

animation 2 is playing + current frame is 8 ---> paste into background + destroy

 
Free graphics,Free Games
http://www.reinerstilesets.de

tobbe



Registered
  26/05/2003
Points
  41
5th October, 2005 at 11:39:22 -

well, I tried some ways, and now its works! though, of course, now I have another problem. Now, when I have several enemies, I want them to all bleed... I can do this for one enemy, but when I try to do it for all of them (using object group for all enemies), I could not use the event:

Collision between "bullet" and group "enemy" ---- create "blood" at group "enemey"

I cant do the last part, choose the "enemy" group as the location where the blood is created.

anyone can help?



 
pixel artist

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
5th October, 2005 at 16:29:24 -

I'm not sure if this will help, but try changing the event to "Collision between Group.Enemies and Bullet" rather than the other way round - it makes the group the "subject" of the event. Or it might do, anyway.

 
http://www.davidn.co.nr - Games, music, living in America

tobbe



Registered
  26/05/2003
Points
  41
5th October, 2005 at 16:38:47 -

tried it, didnt work...The trouble is the last bit, I cant place the group as the location where the blood will appear. now, it doesnt matter which zombie I shoot, its still the only the same first one which bleed.

 
pixel artist
   

Post Reply



 



Advertisement

Worth A Click