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!!!
whenclicked
foreverhelpme ▼forwargamethanksyou are awesome ▼
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
Put this on the first bullet.whenclicked
foreverifmouse down?andnotlength of=bullets ▼0broadcastjoinbulletitem1ofbullets ▼delete1ofbullets ▼wait0.2secs
Second bulletwhen I receivebullet1 ▼shoot the bulletadd1tobullets ▼stop script
Third bulletwhen I receivebullet2 ▼shoot the bulletadd2tobullets ▼stop script
when I receivebullet3 ▼shoot the bulletadd3tobullets ▼stop script
Offline