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

Members Online

»
0 Active | 67 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 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Moving planes?
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Sunday, Mar. 30, 2008 12:34 pm
http://www.modsonline.com/Tutorials-read-200.html
Okke I used the above tut but know get:
" temp = getent (stuka1.target,"targetname"); "
is undifined. (ERROR: object is no field model!)
What can I do to let this work?
Share |
xholyx
General Member
Since: Oct 17, 2007
Posts: 116
Last: Sep 7, 2010
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Sunday, Mar. 30, 2008 01:28 pm
post the whole script please
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Sunday, Mar. 30, 2008 03:25 pm
Code:
main() 
{ 

level thread planes(); 
} 

planes() 
{ 
level.PlaneSpeed = 3.5; 

stuka1 = getent ("plane1","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 60; 
} 
} 


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

wait 15; 

self show(); 

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

wait level.PlaneSpeed; 

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

It's just the same only the "stuka1,tragetname" = "plane1,targetname"
Share |
SpeedHighway
General Member
Since: Apr 30, 2005
Posts: 494
Last: Apr 9, 2008
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Wednesday, Apr. 2, 2008 03:04 pm
I'm going to assume that your "stuka1" is targeting a script_origin. However, is your plane a script_model or a misc_model?
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Wednesday, Apr. 2, 2008 04:47 pm
plane = misc_model
flyto = script_origin

Thanks for helping me
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Wednesday, Apr. 2, 2008 04:51 pm
If you think about it, you just anwsered your problem. You are trying to use a script on a misc_model..

edited on Apr. 2, 2008 12:52 pm by Rasta
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Thursday, Apr. 3, 2008 03:41 pm
Thanks got it working.
(stupid mistake of me)
Share |
SparkyMcSparks
General Member
Since: Feb 28, 2004
Posts: 1713
Last: Dec 29, 2016
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Thursday, Apr. 3, 2008 05:41 pm
If this is a SP map it technically should be a script_vehicle that way you don't have to do all the hard work of scripting the vehicle movement/ sounds/ crash locations/ etc...
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»