Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-14-2002, 04:37 PM   #1
TriXteR
Registered User
 
Join Date: Apr 2002
Location: Canada!!!
Posts: 1
Send a message via ICQ to TriXteR
Default Side scrolling game - gravity

what I have for gravity is

Code:
onClipEvent (enterFrame) {
    if (ground == "true") {
    } else {
        setProperty ("/bird", _y, Number(getproperty("/bird", _y))+10);
        x_value = getproperty("/bird", _x);
        y_value = getproperty("/bird", _y);
    }
}
where "bird" is the character and "ground" is turned on by a looped 2 frame hittest in all my ground objects

Code:
flag = this.hitTest("/bird");
if (flag == true) {
    tellTarget ("/") {
        gotoAndStop ("hit");
    }
}
if (flag == true) {
    tellTarget ("/grav") {
        ground = "true";
    }
}
to either side of the ground object are invisable ground objects that do the same thing except turn "ground" off

now... this works... but it's not very effective... I can't ever make enemies affected by gravity... I was hoping there is an easier, more practical way....

can any body help?
TriXteR is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrolling in my game?? TheGreatOne ActionScript 2.0 1 12-16-2004 07:00 AM
The good ol' "Yugop" side scrolling Menu! Deadhands ActionScript 1.0 (and below) 2 12-18-2003 06:04 AM
classes server, client side with flashcom brusky Flash Media Server 0 08-12-2003 04:20 AM
Side scrolling artbased platform game buzza_gts Gaming and Game Development 5 04-09-2003 06:46 AM
Scrolling Edges (like a side scroller or RTS game) archonix Gaming and Game Development 0 04-08-2003 01:03 AM


All times are GMT. The time now is 12:12 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.