The Daily Click ::. Forums ::. Klik Coding Help ::. Revenge of the active objects!
 

Post Reply  Post Oekaki 
 

Posted By Message

renneF



Registered
  02/08/2003
Points
  672
7th September, 2003 at 09:19:53 -

Heres my problem: I have a character that shoots a very fast machine gun, ant it creates spent shells that eject out of the top of the gun and fall to the ground, and destroy. But after a few seconds of shooting, the shells create at randon locations on the screen! weird eh. I've tried using 'load on call' and 'discard after use' but it didnt help

 
Image

Pkeod

Oontz Oontz Oontz

Registered
  19/11/2002
Points
  93

VIP Member
7th September, 2003 at 10:30:38 -

There could be a number of things... wiether it be hots spots... or anther related thing...

but i would guess; the problem is caused when you have an always event or a press down on key even where an object is shot from another object... if the object that shoots the other one is not present (ie destroyed) then things get screwy

but thats all i would guess 0_o

 
Faerie Solitaire - Get it now:

http://www.create-games.com/download.asp?id=7792

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
7th September, 2003 at 11:01:14 -

in TGF there would be a limit to the objects on screen at any one time, so maybe your exceeding that and its screwing you around.

 
www.thenatflap.co.uk

renneF



Registered
  02/08/2003
Points
  672
7th September, 2003 at 13:42:50 -

Gotta hate that object limit.

 
Image

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
7th September, 2003 at 13:53:39 -

when your bullets hit the ground paste them into the background and then destroy them.

 
Craps, I'm an old man!

renneF



Registered
  02/08/2003
Points
  672
7th September, 2003 at 13:54:12 -

how do I paste them to the background?

 
Image

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
7th September, 2003 at 14:43:20 -

there is an action for it

 
Beware of life ...so far noone have survived it.......

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
7th September, 2003 at 14:46:26 -

should be under the object itself in the event editor.

 
Craps, I'm an old man!

renneF



Registered
  02/08/2003
Points
  672
8th September, 2003 at 10:55:14 -

Im using TGF does that have the paste object event?

 
Image

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
8th September, 2003 at 11:00:22 -

Yes - it's called 'Paste Into Background'

Make sure you destroy objects that you aren't using (e.g. after you pasted the bullet shell into the background)

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
8th September, 2003 at 18:44:48 -

i think they are falling so far off the bottom of the screen that they are appearing at the top again and picking up speed as they go so when they flash on the screen for a split second it doenst dissapear.
just a guess anyway

i think you may need to make the object dissapear if it is 0 pixels from the windows edge.

 
.

Kramy



Registered
  08/06/2002
Points
  1888
8th September, 2003 at 19:21:11 -

Make the objects get destroyed when from -3/4 object size from window.....for example

8x4 bullet destroyed when it reaches -6 pixels from window(-3/4 of

I use events like this for testing mouse positions and scrolling near the edge of the screen.

48x32 char reaches -32 pixels from window
-destroy

Useful to have the character vanish entirely off the screen before being destroyed.


One suggestion...if your gun shoots very fast, have clips, or rounds. Then, if you fire a bullet every 00-05 seconds, create a falling clip every 00-25 seconds to help avoid the object limit.

 
Kramy

renneF



Registered
  02/08/2003
Points
  672
9th September, 2003 at 12:45:13 -

ok thanks everybody I think I've got it now

 
Image

Mutantleg



Registered
  15/05/2002
Points
  244
9th September, 2003 at 14:20:43 -

or add an event like
if 'shell' number is above like 20
then pick a 'shell' and destroy

 
n/a

renneF



Registered
  02/08/2003
Points
  672
11th September, 2003 at 15:07:46 -

wow the paste object event is vey useful, it almost gets rid of the object limit!
(for stopped objects)
I'll just paste them when they are stopped

thanks again

 
Image
   

Post Reply



 



Advertisement

Worth A Click