MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
techno2sl [Faqs]
*UWS*KILL_... [Today]
amishthunder [Forum]
Dugynight [Forum]
riegerminden [Tutor]
355thSGTCL... [Forum]
Welshy [Forum]
deadelvis [Today]

8 Members and 12 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Monday, Dec. 1st
A message from foyleman
Sunday, Nov. 30th
MODSonair 156 Live
Friday, Nov. 28th
MODSonair Episode 155
Wednesday, Nov. 26th
MODSonair Forum Buttons
Monday, Nov. 24th
Holiday Gift Guide 2008 - PC
Latest Poll
Single or Multiplayer maps for World at War?
Single-Player 29.89%
Multiplayer 62.07%
WHAT!? The tools are out? 8.05%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Appreciation
MODSonline.. Posts: (3) Views: (20) by Welshy
Left 4 Dead SDK?
Left 4 Dead Leve.. Posts: (7) Views: (36) by Welshy
Inner/Outer Radius Size
CoD:WW Level Des.. Posts: (5) Views: (55) by [-X-]FriedCoD
A message from foyleman
In The News.. Posts: (41) Views: (217) by foyleman
Art of War Central Half-Life 2 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Help with making a player in game parachute with F
saluden
General Member
Since: Sep 11, 2007
Posts: 56
Last: Nov 25, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Oct. 9, 2008 07:01 pm
ok,

i want a player in my mod to Press F, and it deploys a parachute, they fall slow, and then when they hit the floor, it unlinks and then they can move again, please look at script and help

para_waiter()
{
level endon( "disconnect" );
while(1)
{
level waittill( "connected", player );
player thread para();
level.player takeallweapons();
}
}

para()
{
self endon( "disconnect" );
while(1)
{
if( self.pers["team"] != "allies" )
{
wait 0.05;
continue;
}
if( !isAlive( self ) )
{
wait 0.05;
continue;
}
chute = spawn("script_model")
chute setModel("xmodel/chute");
wait 0.05;
if( self usebuttonpressed() )
{

{
spawn("chute")

player linkto(chute);

chute moveto ((land.origin), 60);

chute waittill ("movedone");

player unlink();

}
}
}
}
xholyx
General Member
Since: Oct 17, 2007
Posts: 73
Last: Nov 22, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Oct. 10, 2008 11:37 am
what problems do u have with it? please post first,
and as i see it isnt really ur own script because there are some things in this script , that i would ask myself ,' Why did i do this?'
also u have to ask some things to yourself, like:
does the script mean what player is?
("player linkto(chute)")
u have to add an line
player = self;
also i wanted to attend u on this part:

chute = spawn("script_model")

u have to define this origin of the chute, so first find out where u want to land the player.

something like this:
origin = self.origin+(0,0,1000); // this is 1000 Z points above the self.origin ( the players origin)
chute = spawn("script_model",origin)

also the whole loop isnt really needed to spawn chute.

u could better do the script like this : (didnt test it)

Code:


i hope u know what i mean, because ur whole script was wrong, so next time just ask how u can make such script, and please define the problem

hope this helps


edited on Oct. 10, 2008 11:41 am by xholyx
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Art of War Central
Partners
Call of Duty Headquarters
The Firing Box
Frag Universe
modbase.be
Battle for Europe COD2
CODAddicts - Call of Duty News & Downloads
XoXide
Ask About
Advertising
Friends
CoD 4 Base
Volcano
Great Gamer
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 155
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Next Show
The next MODSonair show will air LIVE on:

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware