Post your scripting questions / solutions here
Moderator: Moderators
blue60007
General
Posts: 1247 Joined: Sun Mar 07, 2004 11:44 pm
Post
by blue60007 » Thu May 13, 2004 10:50 pm
OK I have two tanks in my map and I have waypoints set up correctly to make a path so they can drive to the ending waypoint. For the first tank I have:
$tank1 drive $t97
$t97 is the first waypoint heading to the last waypoint.
Well the tanks follow the path fine, but when it comes to stop they play the shutdown sound, but they keep on cruising down the street until the crash into something. What do I need to make them stop? I think I should equip them with brakes
...
blue60007
General
Posts: 1247 Joined: Sun Mar 07, 2004 11:44 pm
Post
by blue60007 » Fri May 14, 2004 12:46 am
OK
Nevermind I got them stopping!!
What I did was make a trigger_vehicle and once they triggerd that I used the stop command.
Now the real question is what is the simpilest way to make the tank shoot at the player.
Can I just do this:
level.playertanktarget = $player
I'll try it.
tltrude
Chuck Norris
Posts: 4774 Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:
Post
by tltrude » Fri May 14, 2004 3:42 am
I'm no expert, but I think the turet needs an AI gunner that can see and hear.
Tom Trude,
blue60007
General
Posts: 1247 Joined: Sun Mar 07, 2004 11:44 pm
Post
by blue60007 » Sat May 15, 2004 3:18 am
Thanks, that's a start...
I should break down the tuts and stock maps and try and figure it out.
lizardkid
Windows Zealot
Posts: 3672 Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT
Post
by lizardkid » Sat May 15, 2004 8:25 pm
i was about to suggest that m8, try m3l2 or something like that. abandoned city, Ramsey with you and two paratroopers, tank blows path through wall for you guys. try that.
i'm too lazy to look at it right now....
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
blue60007
General
Posts: 1247 Joined: Sun Mar 07, 2004 11:44 pm
Post
by blue60007 » Sat May 15, 2004 8:43 pm
Alright I now have the tanks shooting!! It is done like so:
Code: Select all
$tank1 thread tank1target
tank1target:
if (isalive self)
{
self fullstop
local.gun = self QueryTurretSlotEntity 0
local.gun setAimTarget $player
local.gun waittill ontarget
wait 2
if (isalive self)
{
local.gun startfiring // FIRE AWAY!!
}
}
end
small_sumo
Lieutenant General
Posts: 953 Joined: Mon Jul 01, 2002 4:17 pm
Contact:
Post
by small_sumo » Sun May 16, 2004 3:29 pm
My levels have the source and have shooting tanks. spr and abtf.
Try those.
lizardkid
Windows Zealot
Posts: 3672 Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT
Post
by lizardkid » Sun May 16, 2004 5:51 pm
small_sumo wrote: My levels have the source and have shooting tanks. spr and abtf.
gezundeict. (ges uhn tight) (waay spelled wrong)
so uh Sumo? gonna try English language sometime?
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
blue60007
General
Posts: 1247 Joined: Sun Mar 07, 2004 11:44 pm
Post
by blue60007 » Sun May 16, 2004 9:20 pm
small_sumo wrote: My levels have the source and have shooting tanks. spr and abtf.
Try those.
Well this works fine:
Code: Select all
$tank1 thread tank1target
tank1target:
if (isalive self)
{
self fullstop
local.gun = self QueryTurretSlotEntity 0
local.gun setAimTarget $player
local.gun waittill ontarget
wait 2
if (isalive self)
{
local.gun startfiring // FIRE AWAY!!
}
}
end
Yeah what does 'spr and abft mean?
Adios!
lizardkid
Windows Zealot
Posts: 3672 Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT
Post
by lizardkid » Sun May 16, 2004 11:48 pm
well, i just got .spr, sprite image, 2d drawing hat can be done in Paint. (funfunfun), older games, like, before 3d came out, used them. think pac-man. he was a sprite and everythnig else was too.
abtf?
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
blue60007
General
Posts: 1247 Joined: Sun Mar 07, 2004 11:44 pm
Post
by blue60007 » Mon May 17, 2004 12:12 am
Ah, basically sprites are like alpha textures, no?
lizardkid
Windows Zealot
Posts: 3672 Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT
Post
by lizardkid » Mon May 17, 2004 12:16 am
uh, sure!!
flat 2d images, ever played Wolfenstein or something like that 3d world with enemies that have images taht always look like they're turning at you? those are sprites.
check out the sams publishing game programming by Michael Morrison, great intro book. trouble is i have wrong compiler for it...
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
small_sumo
Lieutenant General
Posts: 953 Joined: Mon Jul 01, 2002 4:17 pm
Contact:
Post
by small_sumo » Mon May 17, 2004 12:25 am
blue60007 wrote: small_sumo wrote: My levels have the source and have shooting tanks. spr and abtf.
Try those.
Yeah what does 'spr and abft mean?
Adios!
spr = saving private ryan the final scene
abtf = a bridge too far
lizardkid
Windows Zealot
Posts: 3672 Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT
Post
by lizardkid » Mon May 17, 2004 12:27 am
you improved those right?
no wait, you made a enemy at gates movie spinoff bot map right?
eag
hehee
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006