Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

I'm stuck and need a tow (Real Studio games Mailinglist archive)

Back to the thread list
Previous thread: depth sorting problems with RB3D
Next thread: Project Idea: videocam as a game-input device


Re: explosions   -   Jeff Quan
  I'm stuck and need a tow   -   Eric

I'm stuck and need a tow
Date: 04.01.04 21:59 (Sun, 04 Jan 2004 14:59:40 -0600)
From: Eric
Hi -

I'm hope I'm not being a bother but I just can't seem to get this.

I can get my Hero (Cider) to jump up and land on the ground ok and
jump and land on an object.(brick, platform etc..) However two problems
occur.
One is when he lands on an object then walks left or right and goes
off the edge of the object he doesn't fall he just keeps walking. So he's
walking on air.

The second thing is if Cider jumps while he is on an object or "walking
on air"
he will come down but plows through the ground a bit. He doesn't stop at the
ground. Now he will stop at the ground if he jumps from the ground but
not from an object.

Also, since I have changed some thing Cider will not fall down holes
anymore. Bummer...

I'm close but I'm having trouble seeing what I'm doing wrong.
Does anyone see any problems with the code below?

In the NextFrame Event I have:

HeroSprite.y = HeroSprite.y + YVelocity

rightX = Cider.HeroSprite.X + Cider.HeroSprite.image.width
rightY = Cider.HeroSprite.Y + Cider.HeroSprite.image.height
leftX = Cider.HeroSprite.x
LeftY = Cider.HeroSprite.Y

SolidObject = SolidGroundAtXY(rightx,righty)
if SolidObject then
Cider.JumpEnd
Cider.YVelocity = 0
Cider.heroSprite.y = leftY
else
end if

//////////////////////////////////////////////////////
//key check for left, right and down and scrolling here
.
.
.

//////////////////////////////////////////////////////

if me.keytest(&h37) then // command (jump)

if Cider.StandingStillFrame = 0 then
frame_Index = 2
elseif Cider.StandingStillFrame = 3 then
frame_Index = 5
end if
if Cider.jumping then
Cider.jumpCont
else
Cider.JumpStart
end if
Cider.jumping = true

else
Cider.jumpCont
end if
else

end if

////////////////////////////////////////////////////
/////////////////////////
//Check for run button here
.
.
.

///////////////////////////////////////////////////////////////////////////////

Cider.HeroSprite.image = Cider.Images(frame_Index)



Thanks

Eric Richards

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>