Erratic tanks...

Post your scripting questions / solutions here

Moderator: Moderators

blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Erratic tanks...

Post by blue60007 »

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 :wink: ...
Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

OK :D Nevermind I got them stopping!! :D

What I did was make a trigger_vehicle and once they triggerd that I used the stop command. :wink:

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.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

driver

Post by tltrude »

I'm no expert, but I think the turet needs an AI gunner that can see and hear.
Tom Trude,

Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

Thanks, that's a start...

I should break down the tuts and stock maps and try and figure it out.
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

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 »

Will do...
Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

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
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

My levels have the source and have shooting tanks. spr and abtf.

Try those.
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

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 »

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!
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

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 »

Ah, basically sprites are like alpha textures, no?
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

uh, sure!! :wink:

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... :cry: :cry:
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

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

:shock:
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

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
Post Reply