The Daily Click ::. Forums ::. Klik Coding Help ::. nub help with fastloop/paste object into bground TGF
 

Post Reply  Post Oekaki 
 

Posted By Message

TCC



Registered
  21/05/2006
Points
  40
6th June, 2006 at 11:24:52 -

ctrl is pressed
- start loop #0 400 loops

loop trigger #0
- bullet shoot green dot at speed 0
- set x pos of bullet to x pos of bullet + 1

it makes a trail behind the bullet but with 400 objects so i need someone to help me make a trail with paste into background instead

also i wonder if i wanted to use active objects how do i make it so that it doesnt create 400 objects but maybe 30 and i can make them a bit bigger so i can have a animated trail

 
hm?

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
6th June, 2006 at 12:00:48 -

Shooting at speed 0 seems an odd way to do things (unless there's something clever here that I'm missing). Instead, you would use Create Object, and set the position of the object to the current position of the bullet.

To use Paste into Background, you should continually set the position of the "green dot" object to the position of the bullet (rather than creating a new one each time), then use Paste Into Background on the green dot. This will create a permanent trail, though, unless you're using TGF and you scroll off the screen.

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

Werbad



Registered
  18/09/2002
Points
  235
6th June, 2006 at 16:51:48 -

The Fastloop object has a refresh screen function that removes all pastings on the screen

 
n/a

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
6th June, 2006 at 22:18:33 -

UNTROO!

SMB2k uses pasting (it's continual though, so when you go offscreen it stays, it uses invisible actives)

http://bibinson.sitesled.com/SMB2k.zip

it uses a fastloop for the engine.

 
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
6th June, 2006 at 22:24:02 -

@Wong - It's just an even easier way to do trails, especially when dealing with multiple bullets and trails, that way you don't end up with things going all screwy when you try to set position.

I don't know why he's got that Xpos + 1 in there though.

I seriously doubt he really wants it to be pasted into the Background, cause that would basically screw up more than it'd help.

To get that number of objects in the trail down, do this.

Number of (trails) > 0 - Add 1 to value A of (trail)

Value A of (trail) >= 30 - Destroy //You need to tweak this value a bit to get it right

 
Craps, I'm an old man!

Werbad



Registered
  18/09/2002
Points
  235
7th June, 2006 at 08:17:10 -

you shoul NEVER create a trail out of active objects since
1: too many actives are slow
2: you reach the object limit
3: there are better ways
atleast doing as in the other topic (one active/pixel)


 
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
10th June, 2006 at 22:47:53 -

Errr....no. What else are you going to make trails out of? Backdrops?

 
Craps, I'm an old man!

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
11th June, 2006 at 07:18:40 -

NO! COUNTERS!

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
11th June, 2006 at 07:37:31 -

Just make it out of about 10-20 AO's, that what I usually do for trails.

Just a simple "every .10 seconds create 1 "trail" at position of "real object"- set direct "trail" to direction "real object""
"Always- add 1 to value A of trail"
"value a of trail > 50, destroy trail."

I should note that if this trail is animated, give it an "Appearing" Animation of a 1x1 black dot. This is because whenever your trail is created, as soon as it enters the screen, the first frame will ALWAYS be the downwards (dir 24) animation of "stopped", unless it has an "appearing" animation.

Image Edited by the Author.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
   

Post Reply



 



Advertisement

Worth A Click