Page 1 of 1

Using Turret plugin

Posted: Fri Aug 02, 2013 1:52 am
by Agent West
Hi
I'm working on a map and would like to include couple turrets in there. Following the "readme" file from the plug-in this was created:

options
-loadplugin pass\to\plugin\Turret,1
end

#--Turrets---------------------------------------

turretWeapon
name turret1
position 267.43 267.43 156
type MG
lifetime 1
frequency 1
tiltExtent 0 90
angleExtent 0 360
end

turretZone
name zone
position 267.43 267.43 156.59
size 4 4 1
rotaton 45
addWeapon turret1
end

box
name blue_turret
position 267.43 267.43 156.9
size 4 4 0.9
matref blue_team_glass
shootthrough
end
box
name red_turret
position -267.43 -267.43 156.9
size 4 4 0.9
matref red_team_glass
shootthrough
end

turretEjector
position -6 0 0
size 3 3 1
addZone zone
end


(Where "pass\to\plugin" is location of file) Now the map will not load, and an error saying "Unknown object 'turretWeapon'" is displayed. What is causing that?

Re: Using Turret plugin

Posted: Fri Aug 02, 2013 3:13 am
by blast
Try loading the plugin outside of the world file (and possibly before the -world option in the configuration - that part might not matter, though).

Re: Using Turret plugin

Posted: Fri Aug 02, 2013 4:28 am
by Agent West
Moved the whole "options" block before "world" block and moved -loadplugin to be the first thing, still same error. What do you mean "outside of the world"? Through a different text file that basically tells the program what to start when? Or as a stand-alone program that BZFlag can use as needed?

Re: Using Turret plugin

Posted: Fri Aug 02, 2013 12:54 pm
by mr64bit
Have it as a argument when you start bzfs. instead of

Code: Select all

bzfs -world turretmap.bzw
remove the line in your world file that loads the plugin, then start it like this:

Code: Select all

bzfs -loadplugin pass\to\plugin\Turret,1 -world turrenmap.bzw