Usable static weapons added to existing MOHAA DM maps?
Moderator: Moderators
- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
Usable static weapons added to existing MOHAA DM maps?
Is it possible to add usable static weapons to existing MOHAA DM maps using only scripting? For example: adding a usable flak88 to Southern France. Please understand that I am a scripting noob so detailed responses would be greatly appreciated. I am familiar with editing files to incorporate and modify prewritten script. Also, any suggestions on learning reasources for begining scriptors would be welcome.
Last edited by IvanTheTerrible on Sat Jun 28, 2003 11:25 am, edited 3 times in total.
- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
Thanks Alki
I know how to add static objects to a map so I will attempt to do the same thing with the existing trigger entity.
-
stuffmess2001
- Private
- Posts: 6
- Joined: Thu Jun 26, 2003 8:04 pm
-
Krane
- Lieutenant General
- Posts: 782
- Joined: Sat May 31, 2003 4:18 pm
- Location: California, USA
- Contact:
As far as I know yes, you can do it. For that you'll have to modify the original script of the map (I mean, create another script based on the original but w/ your Flakk88). You'll have to save it with the same name of the previous script and make a pk3 file that will "override" the original script. That will make your new map conflict with the original maps, so when playing normal maps, you'll have to remove your pk3 file.
If you want all this, I'm sure someone will help you here (I'm a noob for that).
If you want all this, I'm sure someone will help you here (I'm a noob for that).
- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
That part I understand...but...
I understand how the scripting in the pk3 file overrides the scripting in the original file. The problem is how to spawn a trigger using scripting instead of drawing it into a map like in Radient.
- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
How I hate the Flak 88
As always I appreciate the help Alki. Unfortunately, as soon as I add the local.trigger lines the entire pk3 file gets ignored. Here is the script as I entered it for a test:
//Add Usable Flak88
local.flak = spawn script_model
local.flak model "statweapons/flak88turret.tik"
local.flak.origin = ( 225.00 -400.00 30.00)
local.flak.angles = ( 0 90 0 )
local.flak.scale = 1.0
local.trigger = spawn trigger_multiple
local.trigger.origin = ( 170 -560 20)
local.trigger setsize = ( 100 100 100 )
//Add Usable Flak88
local.flak = spawn script_model
local.flak model "statweapons/flak88turret.tik"
local.flak.origin = ( 225.00 -400.00 30.00)
local.flak.angles = ( 0 90 0 )
local.flak.scale = 1.0
local.trigger = spawn trigger_multiple
local.trigger.origin = ( 170 -560 20)
local.trigger setsize = ( 100 100 100 )
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
copy all the script from the .pk3 into your script
as for the spawning you'll need some more things
local.trigger = spawn trigger_multiple "setthread" "my_thread"
local.trigger.origin = (type in coords of where you want to spawn it)
local.trigger setsize = (specify size) x y z axis.
then have my_thread local.flak.etc...
as for the spawning you'll need some more things
local.trigger = spawn trigger_multiple "setthread" "my_thread"
local.trigger.origin = (type in coords of where you want to spawn it)
local.trigger setsize = (specify size) x y z axis.
then have my_thread local.flak.etc...
hope this helps, prob not cos it's all foreign 2 me :-/
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Muahahaha!
Here you go, a firable flak88, only by scriting...
have the line in main ( after level waittill prespawn )
and insert these methods after main:
- There is no fire sound when the flak88 fires.
- It is only activateable by the trigger, not really usable as an mg42.
- But that, you can probably work out for your self.
This is just to tell you it can be done. Hope that helps.
This was funny
Here you go, a firable flak88, only by scriting...
have the line
Code: Select all
thread spawn_a_flak88and insert these methods after main:
Code: Select all
spawn_a_flak88:
local.flak = spawn script_model "targetname" "flak88"
local.flak model "statweapons/flak88turret.tik"
local.flak.origin = ( 0.0 -100.0 0.0 )
local.flak.angles = ( 0.0 0.0 0.0 )
local.flak.scale = 1.0
local.trigger = spawn trigger_use "setthread" "fire_flak88"
local.trigger.origin = ( 0.0 0.0 0.0 )
local.trigger setsize ( -50 -50 -50 ) ( 50 50 50 )
end
fire_flak88:
iprintlnbold_noloc "Bang!"
local.target = ( 0.0 100.0 0.0 )
// Start the main gun fire animation.
$flak88 anim fire_scripted
// Random wait to give time to the shell to get to the target.
wait 1
// Spawn the explosion animations.
local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
local.Exp3 = spawn "animate/fx_mortar_higgins.tik"
// Shake the ground hard.
exec global/earthquake.scr .23 4 0 0
// Get the animations going.
local.Exp1.origin = local.target
local.Exp1 anim start
local.Exp2.origin = local.target
local.Exp2 anim start
local.Exp3.origin = local.target
local.Exp3 anim start
wait 1
// Remove the animations.
local.Exp1 remove
local.Exp2 remove
local.Exp3 remove
end- It is only activateable by the trigger, not really usable as an mg42.
- But that, you can probably work out for your self.
This is just to tell you it can be done. Hope that helps.
This was funny
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
