Posted: Mon Apr 28, 2008 10:09 pm
My bad. I thought you were spamming your video without even posting the link. I hadn't even read the thread before blurting out. Carry on.
The Next Generation of 2D Roleplaying Games
http://elysianshadows.com/phpBB3/
Code: Select all
Type shuriken
field x,y
field speed,direction
end type
Code: Select all
;function takes a few variables, create an object, and assigns the corresponding variables to the values in the object (member variables)
Function Make_Shuriken(x,y,speed,direction)
shur.shuriken=new shurikens
shur\x=x
shur\y=y
shur\speed=speed
shur\direction=direction
end function
Code: Select all
if keyhit(57) then Make_Shuriken(player\x,player_y,6,player\direction)
Code: Select all
function Update_shurikens()
for shur.shuriken = each shuriken
select shur\dir
case 1
shur\x=shur\x + shur\speed
case 2
shur\x=shur\x - shur\speed
case 3
shur\y=shury\y + shur\speed
case 4
shur\y=shur\y - shur\speed
end select
next
end function
Code: Select all
function Draw_shurikens()
for shur.shuriken=each shuriken
color 0,255,0
rect shur\x,shur\y,4,4,1
next
end function
Code: Select all
drawimage image,shur\x,shur\y
Code: Select all
function Bound_shurikens()
for shur.shuriken= each shurken
if shur\x >= 640+4 then delete shur : exit
if shur\x <= 0 -4 then delete shur : exit
if shur\y >= 480 +4 then delete shur : exit
if shur\y <= 0-4 then delete shur : exit
next
end function
Code: Select all
function Shurikens()
Update_shurikens()
Bound_shurikens()
Draw_shurikens()
end function
You have a tendency to double-post, only click submit once, then be patient? (I fixed it again)eatcomics wrote:OMG, thank you. I was gettin close and this probably will finish it for me.
Don't worry I understand it.