I need to make a unit follow the camera of a specific player.
Using a periodic event with 1/10th of a second intervals and 'move unit instantly' results in something that looks pretty choppy. Does anyone have any other ideas by chance?
Don't use a periodic event. Use a single event and a loop (be sure to include a Wait 0.0 seconds action)! Also make sure you tick the option in Move Unit (Instantly)... I forget what it's called... "smooth transition" or something similar.
That does seem a lot smoother now. But does using an infinite loop like that use more resources than a periodic event?
Yes and no. Calling an event uses system resources, so calling an event once instead of 1000 times will use fewer resources. It also depends on the actions in the trigger and how many threads you are trying to use simultaneously. I tend to favor loops because it seems to handle resources more efficiently than frequent event calls for the vast majority of things I need to do.
The unit is going to seem to be moving choppy (I'm guessing this is what you mean by choppy) because you're issuing an order hundreds of times to a very not-to-far away distance. Increase the distance.
The unit is going to seem to be moving choppy (I'm guessing this is what you mean by choppy) because you're issuing an order hundreds of times to a very not-to-far away distance. Increase the distance.
As far as I understood it he doesn't issue an order, he moves the unit instantly, which results in choppy movement.
I use loops where I issue move orders in 0.03125 intervals and it's not choppy at all.
How's it working out for you? Also how do you move it based off the players camera?
Yeah. Here is what it looks like right now:
I just move it to a point offset from the target position of the players camera.
It's definitely getting there but obviously a dialog would still be very preferable to a unit. I think at this point though it's at least good enough that I will probably add it to the GameHeart overlay.
I have tried using unit orders but I haven't gotten it to work quite the way I want yet. I haven't had much time to work on it in the last few days as I have been super busy. I will keep at it though.
Right now it's just forcibly linked to the banshee, when implemented you will have the option to attach it to a unit, another observer, or control it manually somehow (WASD maybe?)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I need to make a unit follow the camera of a specific player.
Using a periodic event with 1/10th of a second intervals and 'move unit instantly' results in something that looks pretty choppy. Does anyone have any other ideas by chance?
Thanks
@rtschutter: Go
Don't use a periodic event. Use a single event and a loop (be sure to include a Wait 0.0 seconds action)! Also make sure you tick the option in Move Unit (Instantly)... I forget what it's called... "smooth transition" or something similar.
That does seem a lot smoother now. But does using an infinite loop like that use more resources than a periodic event?
Yes and no. Calling an event uses system resources, so calling an event once instead of 1000 times will use fewer resources. It also depends on the actions in the trigger and how many threads you are trying to use simultaneously. I tend to favor loops because it seems to handle resources more efficiently than frequent event calls for the vast majority of things I need to do.
@rtschutter: Go
let me guess, you're moving Zolden's Screen Unit?
How's it working out for you? Also how do you move it based off the players camera?
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@rtschutter: Go
The unit is going to seem to be moving choppy (I'm guessing this is what you mean by choppy) because you're issuing an order hundreds of times to a very not-to-far away distance. Increase the distance.
As far as I understood it he doesn't issue an order, he moves the unit instantly, which results in choppy movement.
I use loops where I issue move orders in 0.03125 intervals and it's not choppy at all.
Yeah. Here is what it looks like right now:
I just move it to a point offset from the target position of the players camera.
It's definitely getting there but obviously a dialog would still be very preferable to a unit. I think at this point though it's at least good enough that I will probably add it to the GameHeart overlay.
I have tried using unit orders but I haven't gotten it to work quite the way I want yet. I haven't had much time to work on it in the last few days as I have been super busy. I will keep at it though.
how do they choose which area to see? How did you link the banshees camera?
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Right now it's just forcibly linked to the banshee, when implemented you will have the option to attach it to a unit, another observer, or control it manually somehow (WASD maybe?)