You could do that. I'm just used to making reusable scripts. This way if you want to make more trapdoors in the future you can use this same script. If you use the GetWaypointByTag and want to make other trap doors, you will have to make a new script for each one with a different waypoint tag. Unless of course you did some type of naming convention like I did with the GetObjectByTag. And then you would just be doing the same thing I just did but with a different function. But that would also work for reusability.
You could also set a string variable on the trap door. Something like "MY_DEST_WP", "TD_WP_1" and then retrieve that to get your destination WP. Again it is just to make it so you only ever need the one script.
Modifié par GhostOfGod, 25 août 2011 - 03:29 .