Announcement

User registrations are currently disabled due to high spam traffic.

#1 21/01/09 11:28pm

danomann
Addict
Registered: 12/08/08
Posts: 210
Website

help plz

ok how do you make a side scrolling game like how do u make a char move wit the screen???? sad


_root.gotoAndDie( [url]www.dako300.co.nr[/url] );

Offline

 

#2 22/01/09 6:25am

davros13
Serious Addict
From: in my location
Registered: 01/06/08
Posts: 438
Website

Re: help plz

Simple make the character have a normal move code then give the ground th reverse of the moving code.


[img]http://i42.tinypic.com/5vd3cy.png[/img]

Offline

 

#3 22/01/09 7:58am

tenjimaru
Moderator
From: SD-CA
Registered: 30/03/08
Posts: 679

Re: help plz

i dont mean to sound rude, do an internet search for tutorials, and what software are you using?


[i]cookie Tenebra Crystallis.. Released!
Portable Fishing 2012 Released!
Find Them In The 'Flash Games' Section of The Forums[/i]

Offline

 

#4 22/01/09 1:12pm

danomann
Addict
Registered: 12/08/08
Posts: 210
Website

Re: help plz

liveswif


_root.gotoAndDie( [url]www.dako300.co.nr[/url] );

Offline

 

#5 22/01/09 3:39pm

tenjimaru
Moderator
From: SD-CA
Registered: 30/03/08
Posts: 679

Re: help plz

I dont know if there are tutorials for it on sidescrolling, I have never used liveswif, but i think that you could follow a Macromedia Flash mx 2004 tutorial, after all its the AS you need, i could just post the code but im on my psp and like I said IDK how liveswif works, you could stick to a simple side scroller for now. big_smile good luck


[i]cookie Tenebra Crystallis.. Released!
Portable Fishing 2012 Released!
Find Them In The 'Flash Games' Section of The Forums[/i]

Offline

 

#6 22/01/09 4:12pm

davros13
Serious Addict
From: in my location
Registered: 01/06/08
Posts: 438
Website

Re: help plz

okay its simple
you know the caracter movement for left and right is

Code:
onclipevent(enterframe)


if (Key.isDown(Key.LEFT)) {
        _x -= speed;
}

if (Key.isDown(Key.RIGHT)) {
        _x += speed;


and
Code:

onclipevent(load)


speed = 4;   

(using the advanced movment tut for speed writen by dezerith here>http://www.pryjon.com/liveswifers/forums/viewtopic.php?t=1632


so we want the background to move left if the caracter moves right and right if the caracter moves left

so take the
_x -= speed;
in
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}

and make that - into +

so we have
if (Key.isDown(Key.LEFT)) {
_x += speed;
}

do the same for
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}

but this time change the + into a -

so the code is now
Code:
   onclipevent(enterframe)
if (Key.isDown(Key.LEFT)) {
        _x += speed;
}

if (Key.isDown(Key.RIGHT)) {
        _x -= speed;
}

onclipevent(load)

speed = 4;



now if the background is moving slow make the 4 in speed a higher number



notice!
the code below is suppose to go in onclipevent(enterframe)
if (Key.isDown(Key.LEFT)) {
_x += speed;
}

if (Key.isDown(Key.RIGHT)) {
_x -= speed;
}


and the below located in the onclipevent(load)
speed = 4;

From liveswifers.org


[img]http://i42.tinypic.com/5vd3cy.png[/img]

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson