Doing a scrolling shooter(Think Operation Wolf).
But the problem is that I can't keep the cursor/crosshair inside the window as it scrolls,(the field follows an invisible object that travels it's own x coordinate+1).
Trying to figure a way to fix this, other then that the damned thing works just fine.
if ur not using a mouse u can create another object that is a set position away from the invisible object - (so that it scrolls at the edge of the screen)
Crosshairs Overlap Active
Run Loop 1 time (im not sure about the number of times, it really depends on the pixel size of the crosshair)
On Loop
Set crosshair x position + 1
should work
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.
Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
3rd April, 2007 at 01:21:08 -
No, that's completely inefficient and wrong. Learn fastloops.
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
3rd April, 2007 at 04:47:07 -
Loop once? That has the same effect as not looping at all, only slower.
just out of interest, does running a code loop for 1 loop execute it instantly regardless of its position? Imagine you have an event occuring at multiple times throughout your code, would replacing those events with a fastloop that performs the events once be more efficient than copying the code into multiple places?
It would, indeed, execute instantly. I suppose if done correctly, you COULD avoid some redundant code like that.
There's also the Fast Function object that might be better suited for the job, but I've never actually tried it.