The Daily Click ::. Forums ::. Klik Coding Help ::. help, some nub problems with fastloop
 

Post Reply  Post Oekaki 
 

Posted By Message

TCC



Registered
  21/05/2006
Points
  40
3rd June, 2006 at 19:39:39 -

k so i tried fastloop out tried to make an object go instantly across the screen and destroy an object that was in its way

+ pressing control
- start loop #0 400 times

+ loop #0
- set objects x position to x position of object +1

+object overlaping object nr2
- destroy objext nr2

it doesnt work, it goes across the screen and lands behind object nr2 but it doesnt destroy it, it just passes it
anyone know what im doing wrong?


 
hm?

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
3rd June, 2006 at 19:50:51 -

try testing your collision event within the loops.

 
Craps, I'm an old man!

Werbad



Registered
  18/09/2002
Points
  235
3rd June, 2006 at 19:54:39 -

Like this:

+ pressing control
- start loop #0 400 times

+ loop #0
- set objects x position to x position of object +1

+ loop #0
+ object overlaping object nr2
- destroy object nr2

 
n/a

TCC



Registered
  21/05/2006
Points
  40
3rd June, 2006 at 20:30:48 -

it worked thx, also noticed it matters where in the event the loop is placed

one more question how do i make a trail behind the object? like a line

 
hm?

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
3rd June, 2006 at 20:51:50 -

well, the non fast loops way of doing it is to simply have the bullet shoot an effect at speed 0 while it's moving.

 
Craps, I'm an old man!

TCC



Registered
  21/05/2006
Points
  40
3rd June, 2006 at 21:09:38 -

+ pressing control
- start loop #0 400 times

+ loop #0
- set objects x position to x position of object +1
- object shoot green dot at speed 0

+ loop #0
+ object overlaping object nr2
- destroy object nr2

this leaves a trail all the way untill the object collides with objext nr2 how do i make it keep on going untill it hits a wall where i want it to stop

 
hm?

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
3rd June, 2006 at 21:18:59 -

Well, considering your bullet seems to go through walls, does it matter?

 
Craps, I'm an old man!

TCC



Registered
  21/05/2006
Points
  40
3rd June, 2006 at 21:26:05 -

i dont have any walls yet so no ;p it doesnt go through walls but i dont want the trail to stop when the object 2 is destroyed i want the trail to stop where the object aka bullet stops

 
hm?

Werbad



Registered
  18/09/2002
Points
  235
3rd June, 2006 at 22:22:54 -

It most likley stops because the object limit is reached...
You can try using pasting the green dot to the background instead of creating new ones...

 
n/a

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
3rd June, 2006 at 22:50:12 -

Well first off, when your bullet dies, it won't be around to fire the effect anymore.

To get rid of the trail, do something like this.

Number of (Effect) > 0 - Add 1 to Value A of (Effect)
Valua A of (Effect) > 15 - Destroy //Doesn't have to be 15.

 
Craps, I'm an old man!
   

Post Reply



 



Advertisement

Worth A Click