rotating
Hi if anyone can help me i am trying to make a bullet be limited to 10 and go in the direction of a ship/actor when it rotates. For the limiting of the shot/bullet I am using this video: To rotate the ship/actor i am going to have right and left button controls and to shoot button on the other side of the screen that has
shoot Button
{
rule when touch it pressed/and touch is inside
[Do change attribute game.shoot hold :to true [change attribute game.shoot :to true]]
[else change attribute game.shoot hold :to false]
}
{
rule if attribute game.shoot is true/and if attribute game.shoot hold is true
[Do timer after 0.5 seconds run to complete [change attribute game.shoot to false]]
}
bullet/shot
{
group with
[change attribute self.starting x :to self.position.x]
[change attribute self.starting y :to self.position.y]
}
{
rule if attribute self.what shot am i = game.shot count/and if attribute game.shoot is true
[Do change attribute self.position.x :to game.shooter x [change attribute self.position.y :to game.shooter y [change attribute game.shoot :to false]]]
}
{
rule when actor overlaps or collides whit actor wall
[DO change attribute self.motion.linearVelocity.x :to 0 [change attribute self.motion.linearVelocity.y :to 0 [change attribute self.motion.angularVelocity.x :to 0 [change attribute self.position.x :to self.starting x [change attribute self.position.y :to self.starting y ]]]]
}
ship/player
{
group with
(
rule if attribute game.rotate left is true
[Do rotate counter clockwise at speed 90]
)
(
rule if attribute game.rotate right is true
[Do rotate clockwise at speed 90]
)
{
group with
[change attribute game.shooter x :to self.position.x]
[change attribute game.shooter y :to self.position y]
}
{
rule when touch is pressed/and if attribute game.shoot is true
[Do change attribute game.shot count :to (game.shot count+1)%10 [change attribute game.shoot :to true [timer after 0.5 seconds run to complete [change attribute game.shoot :to false]]]
}
Comments
What is your actual question ?
when i press my shoot button it move the shot to the ship but the shot doesn't go any ware....
Can you upload a screenshot of the rules for the 'shot' actor (the bullet).
not quite sure how to take screenshots with game salad windows 0.10.4.1... so i took pic with my phone..
hopefully that works...
what is your email and i can send you the pictures that way... i tried to add it through add image/file and that didn't work so i don't know how to do it through this forum...
@ohshoe take a screenshot of your computer screen and crop it in Paint. Right click the file then left click "Send to" then "Compressed (zipped) folder".
In the Leave a Comment box of this thread choose the far right option above find your zipped screenshot and upload it.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
Hopefully this works..
file:///C:/Users/Christopher/Desktop/shot%20actor%20inside.zip
http://b0.raptrcdn.com/img/screenshots/orig/067a654edd97af109411d0b64722d2e7.29c266f0aa354fde834b05c737322bf9.jpeg
http://b7.raptrcdn.com/img/screenshots/orig/067a654edd97af109411d0b64722d2e7.5ed30edbcda5c7e36604f1d29a1d4a2a.jpeg
http://b4.raptrcdn.com/img/screenshots/orig/067a654edd97af109411d0b64722d2e7.9bed49d70be64ccebbe41af9950b9455.jpeg
Here's links to the 3 sections. If the above doesn't work
In these rules (your bullet rules) there doesn't appear to be anything that would make them move . . .
This all seems like an overly complex way of shooting bullets !
Let me make a quick and simple demo . . .
. . . . here's the basic set up I'd use . . .
k thank you