Hi there,
Since I successfully collided the object each other by setting non-solid.
I want to let the enemy ball moves to player ball until the enemy ball reached to player ball’s position then kill player ball.Whatever the player moves,the enemy ball is attracted by the player.
Assume enemy ball is red ball and player ball is white ball
I have ever tried to use enemy set position to object player,but it’s too fast seems that no movement it does.
So can you help me this action with the event.
When click shoot button
Shoot a little cyan ball (it is bullet) from the player ball to hurt the enemy ball.
Assume enemy ball full health : 100
Therefore,substract 5 to it health
If holding the screen to trigger the shoot button
The bullet will be repeatedly dispensed until the shoot button no detect.
Therefore,when the bullet frequently shoots to the enemy ball,each bullet hurt it 5 health until enemy ball 's health bar < 0
Due to the fact that I’m confusing about shooting function.
I’m out of time for making demos tonight, but I remembered this earlier thread which will answer a lot of your questions, in particular about shooting:
Add another object to the scene, make it invisible and place it in the player position, for example, let’s name it “Shoot Controller” and we need to constantly turn it towards the enemy:
1)IF
Shoot Controller/Appearance/Hidden/No
DO
Shoot Controller/Appearance/Set Opacity/0
Shoot Controller/Position/Set Position To Object/Player
Shoot Controller/Angle/Face To Object/Enemy
Create a bullet and add it to the new class “Bullet” and place the bullet to the left of the scene (for example “x= -5” position)
We make a shoot:
2)IF
Shoot Button/Sensing/Touch Down
DO
Shoot Controller/Clone/Clone Object/Bullet
3)IF
Any Objects In Class "Bullet"/Position/Right Of Coordinate/ -4
DO
Affected Objects In Class "Bullet"/Movement/Move Forward In Over Time/3 m
We remove the bullet in two ways:
4)IF
Any Objects In Class "Bullet"/Sensing/Collided With Object/Enemy
DO
Affected Objects In Class "Bullet"/Clone/Remove Clone
Enemy Health Bar/Value/Subtract/5
5)IF
Any Objects In Class "Bullet"/Position/Right Of Coordinate/ 3.5
OR
Any Objects In Class "Bullet"/Position/Left Of Coordinate/ -3.5
OR
Any Objects In Class "Bullet"/Position/Above Of Coordinate/ 2.5
OR
Any Objects In Class "Bullet"/Position/Belove Of Coordinate/ -2.5
DO
Affected Objects In Class "Bullet"/Clone/Remove Clone
How to let the enemy health bar tracking to enemy ball above.?I don’t want click any button to control it’s tracking.I want the enemy health bar moves if enemy ball is moving.
Try using the “join” behaviour to make two objects move together. I believe there’s a tutorial on the “learn” page (or the “learn” tab inside Ready Maker).
I made this for you. hope it helps.
Use joytstick/keyboard
Move your ship, tap shoot.
Ship shoots red bullet the direction it’s facing.
When octopus is hit, it’s health bar lowers by 5
When health bar is less than 1, octopus hides.
Look at all behaviours and physics for the sprites, and check to see which are solid on/off.
And check the code used.