How to implement point and click?
by Ian Winter · in Torque Game Engine · 08/20/2005 (5:06 pm) · 6 replies
Okay, working off the starter.fps I've managed to make some camera alterations amongst other changes and got myself a nice isometric-style 3rd person camera as I want. However, now I want to be able to click a point on the terrain and have my player run to there, instead of have the player controlled by keys. I have the RTS starter kit and I realise that allows you to move units via point and click but I need some pointers as to where to start looking in the code to start implementing this kind of thing. I wasn't able to find any resources relating to this kind of character control but if I've missed any I'd been greatful if someone can point me in the right direction. Essentially my final goal is to have an RTS/RPG style control system where the user clicks where he wants his character to go, can click on enemies to attack and so on but there's only one character per player so it's not really an RTS game. I don't really want to work straight off the RTS starter kit as I'm going to move to TSE ASAP and so a total port of the RTS SK is overkill right now. Hope someone can help, thanks in advance!
#2
-Ron
08/20/2005 (8:10 pm)
Keep in mind that was done with an older code base, I am planning on reworking it for 1.3 and 1.4 when it is released..might look into a TSE one as well-Ron
#3
08/20/2005 (8:40 pm)
Look in the RTSUnit ProcessTick thing, in there you should find the code it uses to move the RTS Units to the clicked location. You code copy the code from there and put it in Player ProcessTick, changing the code to fit the Player Class. If I get time tomorrow Ill work on that, it may come in handy for my project anyway. I will not be able to post it in the forum though, so ill post it in the RTS Forums under resources if I decide to make the mod.
#4
08/20/2005 (8:40 pm)
@ Ron: That's great! I can't wait for it!
#5
08/20/2005 (8:45 pm)
Oh and to everyone who wants the Point and Click without the RTS Starter kit, im pretty sure I put up a resource or posted a tutorial on getting the Pick and Click resource they had on the site to work with 1.3.. edit: I cant find either the resource or my post at the moment though.
#6
Robert, if you do find your tutorial I'd be greatful to have a look ;) Hopefully the info I've got here will do the trick though for now at least ;)
Thanks also Ron for a great resource, do you have any time scale on your updated versions ;) ?
08/21/2005 (5:05 am)
Thanks guys, I was searching for things like point and click so no wonder I didn't get anywhere ;)Robert, if you do find your tutorial I'd be greatful to have a look ;) Hopefully the info I've got here will do the trick though for now at least ;)
Thanks also Ron for a great resource, do you have any time scale on your updated versions ;) ?
Torque Owner Stephen
GearedMind Studio