Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 54 Guests
Online:

LATEST FORUM THREADS

»
New BF2 Mod
BF2 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty: World at War
Category: CoDWW Scripting
Scripting and coding with Call of Duty: World at War.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Spawning turrets using scripts.
[ZCT]Titan
General Member
Since: Feb 23, 2009
Posts: 172
Last: Apr 5, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 12:49 am
Ok so im working on auto turrets and im trying to spawn a mg42 turret into prototype.

Th problem is the map doesnt have a mg42 in the map already and i have no idea if theres away around this. Im hoping some one can give me some info on how to get past this. I really dont want to have to make the script give the effect of shooting but really only do like 20000 damage to the zombie.

Titan
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 02:08 am
lol I had a bit of trouble translating what worked in previous COD titles to WaW because they changed things.

Anyway, this code works in multiplayer and will spawn a usable 30cal mounted turret anyway on the map you want:

Code:
{
	turret = spawnTurret( "misc_turret", (-2795, 1526, 20), "30cal_bipod_crouch_mp" );
	turret.angles = (0,90,0);
	turret setmodel( "mounted_mp_30cal_bipod_lmg" );
	turret setleftarc( 45 );
	turret setrightarc( 45 );
 	turret settoparc( 15 );
	turret setbottomarc( 15 );
	turret.weaponinfo = "30cal_bipod_crouch_mp";
	turret.targetname = "test01";
}


Now, that worked on a map which already had a 30cal, but I know from my demon mod for COD4, that its possible to do it on any map as long as you:

1. Add the weapon file to your zone/mod CSV file
2. Add the models - in this case the mounted_mp_30cal_bipod_lmg
3. Include the weapon file in your level/mod IWD file.

The SP/CoOp equivalent of 30cal_bipod_crouch_mp is obviously 30cal_bipod_crouch and the equivalent of mounted_mp_30cal_bipod_lmg is mounted_usa_30cal_bipod_lmg.

Other weapons are possible as long as there is a mounted_ model to go with it. So, there is one for Germans and Japanese as well.

Share |
[ZCT]Titan
General Member
Since: Feb 23, 2009
Posts: 172
Last: Apr 5, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 02:12 am
Man demon i hope your right ill try this real quick because this is killing me and i think treyarch did this a dumb halfway way lol. They could jsut make it so we can spawn turrets we want in script and dont need a static turret in the map already.
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 02:32 am
Well, it works in MP - you can spawn a turret on any map.

I took a stock WaW map which didnt have a turret, included all the right files, and viola! It spawned no problem.

Here is a 30cal on mp_courtyard spawned on some random barrel:



I cant see any reason for this not to work in zombie mode, as almost everything that works in MP works in CoOp and zombies. You just have to remove the "_mp" from any weapons.
Share |
[ZCT]Titan
General Member
Since: Feb 23, 2009
Posts: 172
Last: Apr 5, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 02:34 am
Ok sweet demon now if you dont mind me asking i have a hud element to display in text how much health a player has... problem is not that it doesnt display the health it wont display the health if the player is hit. Not sure what i did wrong and i can post the script if you decide to help me :]
Share |
[ZCT]Titan
General Member
Since: Feb 23, 2009
Posts: 172
Last: Apr 5, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 02:38 am
Still no luck with it demon i included all the files i needed to like you said but......


Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 03:37 am
Yep, looks like you're out of luck with that particular spawn function. However, if you are making an auto turret, why do you want a working turret that a player uses anyway? With my sentry gun mod for COD4, its just a model which is manipulated via script.
Share |
[ZCT]Titan
General Member
Since: Feb 23, 2009
Posts: 172
Last: Apr 5, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 03:44 am
Thats the thing with zombies as the health and more zombies come along it stops working and i dont like the fact all it does play effects then does damage... But if thats the only way then so be it. I hate how treyarch did the turrets thing hope it isnt like this in the new cod coming out.....
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 04:33 am
Got it to work!

Hang on a bit though, while I refine the process, and then I'll post how I did it.
Share |
[ZCT]Titan
General Member
Since: Feb 23, 2009
Posts: 172
Last: Apr 5, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Saturday, Jul. 10, 2010 04:34 am
Demon if it works im gonna fall inlove with you not really but dude your awesome :o
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»