I really want to make a war game but I don't know what to put in the scripts for: Bullets, person jumping, opposite side of the game (CPU) and how to use scrollX.
Could you please tell me what are the basic scripts for each please!!!
when gf clicked forever help [me v] for [war] game thanks [you are awesome v] end
Offline
Well for bullets you can start off with the basic way of having several bullet sprites that when the mouse is clicked the bullets are fired in that direction and keeps going until it hits a wall or the person.
So...
When green flag clicked
forever
if <mouse down>
[change [shot] by [1]] (This means that each bullet will fire individually)
[broadcast [shot]] (This will tell the bullets that a shot has been made)
[wait until <not<mouse down>>]
Bullets:
When I recieve [shot]
if <<shot>= [(numberof the bullet)]>
[point towards mous pointer]
[repeat until <touching (wall/object/colour)>
[move [5] steps]
]
[switch to costume [explode]]
[hide]
Hope this helps
For the bullets
Offline
Hotwire wrote:
When green flag clicked
forever
if <mouse down>
[change [shot] by [1]] (This means that each bullet will fire individually)
[broadcast [shot]] (This will tell the bullets that a shot has been made)
[wait until <not<mouse down>>]
Using the change [shot] by 1 isn't the most efficient way, I prefer using lists.
Put this anywhere
when gf clicked forever if <<mouse down?> and <not <<length of [bullets v]> = [0]>>> broadcast <join [bullet] <item [1] of [bullets v]>> delete [1] of [bullets v] wait [0.2] secs end endPut this on the first bullet.
when I receive [bullet1 v] shoot the bullet add [1] to [bullets v] stop scriptSecond bullet
when I receive [bullet2 v] shoot the bullet add [2] to [bullets v] stop scriptThird bullet
when I receive [bullet3 v] shoot the bullet add [3] to [bullets v] stop script
Offline