Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a AI move like in the conquerors?

Asked by 7 years ago

I am wondering how I would make a AI move like in the conquerors. For instance, you click the unit, and click a place for it to go. I know how to click it but I don't know how to make the unit actually move. It would be great if somebody could help me. Looping through and changing the position of the plane is easy, but it is not as smooth and has issues.

1 answer

Log in to vote
0
Answered by 7 years ago

Roughly speaking, I believe you could place a BodyPosition into the unit. Then use the mouse's position, when clicked, and plug it into the BodyPosition. This would get the units to move to the location almost instantly! So you would need the script to update the BodyPosition in increments of the mouse's position.

To get the rotation, you can use a BodyGyro and rig it so it always points at the mouse's position when clicked.

BodyPosition and BodyGyro will give you smooth results for when the units are on the march! You will need to do some research to figure out how to use these things. (sadly my roblox studios wont open D;) but try using the wiki and searching "BodyPosition" and "BodyGyro". Hope that helped ;)

0
Thank you! goldstorm950 65 — 7y
0
You also gave me a way for them to shoot! goldstorm950 65 — 7y
0
glade to help :D Worthy0ne 68 — 7y
0
How would I get the unit parts to stay together? They move but then the fall apart. goldstorm950 65 — 7y
View all comments (3 more)
0
What do you mean by unit parts? Worthy0ne 68 — 7y
0
Like if I make a plane, I could use a middle block and 2 wings. When they start moving the wings fall off of them. Im guessing I would have to weld but is that the answer? goldstorm950 65 — 7y
0
correct i would weld them. there are other ways to do this to, like you could unify (this is a little sketchy), you could creat a 3D mesh useing blender or another app, or if you wanted to animate your units you could connect the parts with Motor6Ds. Worthy0ne 68 — 7y
Ad

Answer this question