im trying to make the enemies that i create follow me around, but they are not moving no matter what i do
can someone explain what ineed to do?
mega.co.nz/#!nRk3AThb!XdPIjnymj … MalxvX6SYI
decryotion key:XdPIjnymjnxI0fqaae5UDnTusdOG2_QnwMalxvX6SYI
im trying to make the enemies that i create follow me around, but they are not moving no matter what i do
can someone explain what ineed to do?
mega.co.nz/#!nRk3AThb!XdPIjnymj … MalxvX6SYI
decryotion key:XdPIjnymjnxI0fqaae5UDnTusdOG2_QnwMalxvX6SYI
Ok, finally I get your project, now I can help you, I used “commando2.gdg”:
0- Scene:
-There is a second “1psoldier” in the scene, very far at left, causing things rolling unexpectedly, since all is managed taking account only one 1psoldier.
-You need a SolidsSoldiers group, to check collisions with solids.
1- Event 1.2: You set variable “player” = 1, but you don’t set “canMove” = 1, and many events needs “canMove” = 1
2- Events 1.3-1.7 and 1.12: These events uses the same conditions “player” = 1 and “canMove” = 1, every them could be a sub-event of a main event with these conditions.
3- Event 1.11: You hide the object “VisionA” every frame, but never unhide it, so hiding it at the beginning of the scene should work.
4- Event 1.12: Change the window size every frame is a bad idea I think…
5- Event 1.13:
-Bad expression, you use “1psoldier.X(canon)” instead “1psoldier.PointX(canon)”, and since “1psoldier.X()” exists, GD doesn’t report an error.
-After creating the bullet, you should change the Z-Order of the bullet after creating it to a value greater than 1 (wich is the Z-Order of the ground).
-It doesn’t generate an error, but you never set the 1psoldier’s variables “RateOfFire” and “TimeSinceFire”, and never increase “TimeSinceFire”.
6- Event 1.14:
-Bad expression: “respawn.X(respawn)” instead “repsawn.PointX(respawn)”.
-You use again the condition “At the beginning of the scene” but adding new conditions, so you could put them in a sub-event of the first “At the beginning of the scene”.
-Repeat an action over the same object doesn’t iterate through all of them, you are moving all of them at the same time… You need a “For each object” loop.
Try to get the things working by yourself first, I upload here a “fixed” project, check this out if you get stucked :
https://docs.google.com/uc?export=download&id=0BzdNnzg7ZnjpRVZhQllRSzBhRDQ
sorry i sent you the old version i made those corrections i forgot to upload the new one.
mega.co.nz/#!bZ0WwITJ!Y_ea1wCdM … OmUXLbFRG4
decryp key: Y_ea1wCdM2plsQkrVxYcNvSgKwdZ49N00OmUXLbFRG4
i still dont get how to make the enemies follow u