For the plane
When [space v] key pressed Broadcast [bullet v] EndAnd for the bullet
When gf clicked Hide When I receive [bullet v] Go to [plane v] Show Point in direction ([direction v] of [plane v]) Repeat until <<touching [enemy v]> or <touching [edge v]>> Move [3] steps End If <touching [enemy v]> Broadcast [kill enemy v] End HideAnd for the enemies
When I receive [kill enemy v] HideHope that I helped
Last edited by numberonegamers (2013-01-21 21:43:16)
Offline
numberonegamers wrote:
For the plane
When [space v] key pressed Broadcast [bullet v] EndAnd for the bulletWhen gf clicked Hide When I receive [bullet v] Go to [plane v] Show Point in direction ([direction v] of [plane v]) Repeat until <<touching [enemy v]> or <touching [edge v]>> Move [3] steps End If <touching [enemy v]> Broadcast [kill enemy v] End HideAnd for the enemiesWhen I receive [kill enemy v] HideHope that I helped
Excellent example.
Just one problem, this:
Point in direction ([direction v] of [plane v])Should be this:
Point in direction <([direction v] of [plane v]) - [180] >Wouldn't want the bullet flying backwards.
Offline
ok... this is for the bullet
[scratchblocks]
when (space) key pressed
broadcast (shoot)
Offline
sorry...
when (space) key pressed broadcast (shoot)
Offline
once again,
when [space] key pressed broadcast [shoot]
Offline
when gf clicked hide
Offline
when I receive [bullet] go to (plane) point in direction <pick random (-90) to (90)> repeat until [touching (enemy)] move (10) steps end hide
Offline
CheeseMunchy wrote:
numberonegamers wrote:
For the plane
When [space v] key pressed Broadcast [bullet v] EndAnd for the bulletWhen gf clicked Hide When I receive [bullet v] Go to [plane v] Show Point in direction ([direction v] of [plane v]) Repeat until <<touching [enemy v]> or <touching [edge v]>> Move [3] steps End If <touching [enemy v]> Broadcast [kill enemy v] End HideAnd for the enemiesWhen I receive [kill enemy v] HideHope that I helpedExcellent example.
Just one problem, this:Point in direction ([direction v] of [plane v])Should be this:Point in direction <([direction v] of [plane v]) - [180] >Wouldn't want the bullet flying backwards.
Thank you both for your help my ship now fires had to change the orientation of the sprite bullet because it shot out the side of the ship which was kinda funny but now it shoots straight
keep a eye out for the finished product also i am going to be making a help thread tut and will be giving credit where it is due
Offline