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

Members Online

»
0 Active | 66 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: flying planes
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Jul. 30, 2007 03:43 am
I am trying to add flying planes to my map. Here's what I have so far. In a seperate .gsc file I have this script:

main()
{

level thread planes();
}

planes()
{
level.PlaneSpeed = 15;

stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","targetname");

temp = getent (stuka1.target,"targetname");
stuka1.dest = temp.origin;
stuka1.start = stuka1.origin;
stuka1 hide();
temp = getent (stuka2.target,"targetname");
stuka2.dest = temp.origin;
stuka2.start = stuka2.origin;
stuka2 hide();
temp = getent (stuka3.target,"targetname");
stuka3.dest = temp.origin;
stuka3.start = stuka3.origin;
stuka3 hide();

wait 2;

while (1)
{
stuka1 thread plane_flyby("stuka_flyby");
wait .15;
stuka2 thread plane_flyby("stuka_flyby");
wait .15;
stuka3 thread plane_flyby("stuka_flyby");

wait 120;
}
}


plane_flyby(sound)
{
// If you specified a sound to play then play it
if (isdefined (sound))
self playsound (sound);

wait 1;

self show();

self moveto(self.dest, level.PlaneSpeed, 0.1, 0.1);

wait level.PlaneSpeed;

self hide();
self.origin = self.start;
}


Then for sound I have this script in my csv file:

name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,
ambient_mp_skyscraper,,ambient/amb_Russia03_ext.mp3,0.63,,,,,,,local,streamed,,looping,,mp_skyscraper,,,,,,,,
stuka,,vehicles/c47_flyby01.wav,0.6,,,,,,,local,,,,,mp_skyscraper,,,,,,,,
stuka_flyby,,vehicles/c47_flyby03.wav,0.6,,,,,,,local,,,,,mp_skyscraper,,,,,,,,

However in the game I do not get any planes or the sound fx from them. Do I need to add something in radiant? Is my scripting wrong? Please help.

Share |
TexasRebel
General Member
Since: May 1, 2006
Posts: 373
Last: Aug 20, 2013
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Monday, Jul. 30, 2007 04:04 am
1.) Do you have script_models of the planes with the appropriate targetnames used in the gsc.

2.) Do you have an script_origin with the targetnames of:
stuka1.target
stuka2.target
stuka3.target

You need all 6 of those for the script to be of any use.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Jul. 30, 2007 04:25 am
does it matter where in the map i put these script models and origins?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Jul. 30, 2007 08:48 am
Yes, they should go where your planes start from (the models) and where they're going to (the origins). It's all in the tutorial.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Jul. 30, 2007 10:23 pm
ok i have 3 script_models and 3 script_origins in my map. The origins have the 3 target names stuka1.target, stika2.target, and stuka3.target. What values do i put for the script_origins? Is there anything else?
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Tuesday, Jul. 31, 2007 08:03 am
No you dont give the script origins targetnames of stuka.target.

You target the origins from the plane models.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Jul. 31, 2007 09:56 pm
I'm really sorry but you have now lost me [cry]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Tuesday, Jul. 31, 2007 10:11 pm
In the editor, first select a plane, then select a script_origin and then hit W to target the origin from the plane.
[idea]

Grassy

edited on Jul. 31, 2007 06:13 pm by WHC_Grassy
Share |
BooST_Scrappy
General Member
Since: Jul 4, 2007
Posts: 14
Last: Jul 31, 2007
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Jul. 31, 2007 10:21 pm
Heres in idea!!!

Make ur own scripts and stop copying noob!

Then it will work...
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Jul. 31, 2007 10:27 pm
when i try and load the plane model into my map it doesnt load the right model. the model i am trying to load it vehicle_stuka_flying, but instead i get xmodel/prop_pipetower_crossbarbrace.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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

»