Page 4 of 6

PostPosted: Sat Apr 21, 2007 5:34 pm
by Sgt. Sparky
does it work now?(use code above ^ )
:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D |
EDIT: try again, I just changed that code :D

PostPosted: Sat Apr 21, 2007 5:38 pm
by Troodon
Half of the problem is solved! :D :D :D :D :D :D :D
Still one thing: how can I make the scroller be on the bar? Now it's always somewhere in the left down of the view.

EDIT: the bar is in the right side.

PostPosted: Sat Apr 21, 2007 5:40 pm
by Sgt. Sparky
xD
oi, look at my painter demo, on the draw actor event of one of the sliders it shows how to do it depending on the bar position :)
http://game-editor.com/forum/tp-3333-PainterV1-0.html
:)
I am replying sorta' slow because I am busy :(

PostPosted: Sat Apr 21, 2007 5:45 pm
by Troodon
I'll check it out. :)

PostPosted: Sat Apr 21, 2007 5:46 pm
by Sgt. Sparky
okay. :D
I posted the full thing so people could see how to do alot of drawing functions and other stuff that is good for games :D

PostPosted: Sat Apr 21, 2007 5:54 pm
by Troodon
Hey, I managed to make it so that the y is correct.
How can I make it start from the correct x position?

PostPosted: Sat Apr 21, 2007 5:55 pm
by Sgt. Sparky
xD on create actor event x = pakki.x + pakki.width / 2;
:D
if pakki is a tile actor x = pakki.x + pakki.x; :)

PostPosted: Sat Apr 21, 2007 5:59 pm
by Troodon
I tried that already. It starts from correct position but in a sec it flies to the wrong place. I think something is wrong in my draw actor code. Here is my whole DAC for scroller:
Code: Select all
yscreen = palkki.yscreen;
if(change == 0 && x > -100)change = 1;
if(change == 1) {
populationLimit = (x + 100) / 4;
if(x < -100)x = -100;
if(x > 100)x = 100;
                        }

PostPosted: Sat Apr 21, 2007 6:00 pm
by Sgt. Sparky
is pakki a tile actor?
becuase if it is,
Code: Select all
yscreen = pakki.yscreen + pakki.height / 2;

:D

PostPosted: Sat Apr 21, 2007 6:02 pm
by Troodon
It's not a tile actor anymore.
It was only in the example to be more flexible.

PostPosted: Sat Apr 21, 2007 6:03 pm
by Sgt. Sparky
ah okay,
why not trying,
Code: Select all
yscreen = pakki.yscreen - height/2;

:D

PostPosted: Sat Apr 21, 2007 6:07 pm
by Troodon
No, it makes it worse. It changes even the y position.
I mean correct x position for start.

PostPosted: Sat Apr 21, 2007 6:09 pm
by Sgt. Sparky
?
hmm, if it is supposed to start out at the right on the create actor event use
Code: Select all
x = pakki.x + pakki.width / 2;

:D

PostPosted: Sat Apr 21, 2007 6:17 pm
by Troodon
Yeah, that's already there, but it doesn't work. :(

PostPosted: Sat Apr 21, 2007 6:24 pm
by Sgt. Sparky
I do not know what the problem is
:(
send me the new .ged and data xD
but could you please test this what I have so far of my game?
controls:
left arrow to go left,
down arrow to go right,
up arrow jump,
down arrow crawl :)
I will see what I can do to help :)