How would I set up trapping, explosives, and baiting in Torque?
by Matt Vitelli · in Torque Game Engine · 06/27/2005 (2:40 pm) · 15 replies
Hi there! I'm making a dinosaur hunting game where you can trap and bait dinosaurs. I just had a few questions. Is there any way that if I throw an object to a certain place an AI character will follow it? I want to be able to lure dinosaurs to places in the game. Also, is there any way of setting up traps that both the AI and player could trigger? I'm thinking sort of like a bear trap. What about setting up mines or explosives? I mean like when you walk over them it blows up and kills you or the AI player instantly. If someone could answer any of these questions I'd be very greatful.
Thanks,
Matt
Thanks,
Matt
#2
Take a look at the weapons in stock TGE. There also was a resource a few months back with "exploding barrels" - might be something for you as well.
06/27/2005 (3:42 pm)
You create a onCollision function for each object or a set of objects, and make it behave the way you like it.Take a look at the weapons in stock TGE. There also was a resource a few months back with "exploding barrels" - might be something for you as well.
#3
06/27/2005 (6:44 pm)
Well you could also make it a projectile that doesn't explode on collision with the ground. The weapon image would be the mine or bait and so would the projectile if you had the fire animation a swinging motion it would look like he was throwing it.
#4
edit: typo
hey Matt I might be able to make a resource for the mines since I don't Have much to do, but if it doesn't come out in the next 3 days then it probably won't happen because I'll be in Japan for a month.
06/27/2005 (6:45 pm)
Oh and check out the aiguard resource you could make him look for bait kind of like how he looks for health.edit: typo
hey Matt I might be able to make a resource for the mines since I don't Have much to do, but if it doesn't come out in the next 3 days then it probably won't happen because I'll be in Japan for a month.
#5
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5377
this is a resource for the melee they use in realm wars
06/28/2005 (8:28 am)
With the AI guard make sure you put in the C++ and theres a line in aiguard.cs which says somehting like disable_ai_guard= if thats set to true they will never come.http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5377
this is a resource for the melee they use in realm wars
#6
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5377
this is a resource for the melee they use in realm wars
06/28/2005 (9:07 am)
With the AI guard make sure you put in the C++ and theres a line in aiguard.cs which says somehting like disable_ai_guard= if thats set to true they will never come.http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5377
this is a resource for the melee they use in realm wars
#7
06/28/2005 (9:12 am)
Ok. Thanks! I'll give that a try...
#8
06/28/2005 (11:39 am)
I think the land mine code is all done I just need to texture the model
#9
06/30/2005 (5:01 pm)
I think the resource is up they apperently need to check it before you guys can see it though.
#10
06/30/2005 (5:03 pm)
Thanks, Master Treb! Can't wait to see it.
#11
07/03/2005 (3:51 pm)
Hmm taking a while to check I'm writing from my hotel which has internet. I wrote on a post in the resource I would be away for 3 weeks maybe they don't want to put it up til I get back? I haven't got an email or anything. if anybody gives me their email I could mail it to them.
#12
07/03/2005 (4:26 pm)
Heh, my resource took at laest 3 months to come up...not surprised though, we've been getting a lot of good resource posts in the last few months
#13
07/03/2005 (4:28 pm)
Treb, if you could send it to my email I'd be very happy. Check my profile.
#14
Rex
07/04/2005 (11:14 am)
If I may ask, could you also send me a copy via public Profile email?? Thanks, I've got a mineType object intended and wanted to see how you were approaching it. Mine is intended to have some animations included as well, and an 'attaching' feature. I did some hackWorthy 'thrown' weaponery, which 'tossed' projectiles.....probably would seem better with the ::onThrow function, but I need to tie in a spawning of the mine....or not.Rex
#15
08/05/2005 (6:32 pm)
The resource is up search "mine" on resource search and that should get it.
Torque Owner Stefan Lundmark
Mines should be pretty easy, change the "oncollision" script functions and make them applydamage(); to the playerobject when you collide with them. Doesn't get much easier than that :)