Find Jobs
Hire Freelancers

Director Code v11.5 - help needed

$30-250 USD

已关闭
已发布将近 14 年前

$30-250 USD

货到付款
Hi, i am in the middle of creating a game for a first year university project. I have had trouble geting a bullet to fire out of a moving sprite which is controlled by the keyboard arrows. Here is the script attached to the moving sprite, property pMySprite, pSpeed on beginsprite me pSpeed = 5 pMySprite = sprite([login to view URL]) end on exitframe case TRUE of (keypressed(124)) : [login to view URL] = [login to view URL] + pSpeed [login to view URL] = 1 (keypressed(123)) : [login to view URL] = [login to view URL] - pSpeed [login to view URL] = 0 (keypressed(125)) : [login to view URL] = [login to view URL] + pSpeed (keypressed(126)) : [login to view URL] = [login to view URL] - pSpeed end case end The above code simply moves the sprite arround the screen, below is the code ive attached to the bullet... property pTankShell , pSpeed, pTop, pBottom, pFire on beginsprite me pTankShell = sprite([login to view URL]) pSpeed = 15 pTop = - 10 pBottom = 610 pFire = false end on exitframe me if keypressed (49) then Shoot if [login to view URL] > pBottom then [login to view URL] = pTop pShoot = false end if end if on Shoot [login to view URL] = sprite(3).locv + pSpeed [login to view URL] = sprite(3).loch end All this code seems to do is relocate the bullet to the postition of the moving sprite. how could i have the bullet moving down to the bottom of the stage from the position of the moving sprite, then reseting to the top of stage until the key is pressed again. Any help would be appriceated for this project needs to be in for monday. thanks very much,
项目 ID: 678509

关于此项目

远程项目
活跃14 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

UNITED KINGDOM的国旗
N.Ireland, United Kingdom
5.0
1
会员自6月 5, 2006起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。