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

Members Online

»
0 Active | 64 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 subscribe
Author Topic: script origins
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Saturday, Nov. 22, 2008 06:15 pm
Hi, i was wondering how you would get a script brushmodel to move to an origin then to another origin like that i looked in the getting started in scripting tutorial, i know how to scirpt sort of but i am wondering how u would send it to the origin.
is it something like:

Code:
main()
{
thread plane_slider ();
}

plane_slider ()
{
plane = getent ("plane", "targetname”);
trig = getent ("plane_trigger ", "targetname”);
while (1)
{
trig waittill ("trigger");
door moveto (origin.plane1);
door waittill ("movedone”);
wait (4);
door movez (origin.plane2);
door waittill ("movedone”);
}
}


I know thats wrong but can someone give me a basic moving to an origin script

thanks ukdjaj[thumbs_up]
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Saturday, Nov. 22, 2008 08:55 pm
please someone
Share |
Slipknot14
General Member
Since: Feb 23, 2005
Posts: 109
Last: Sep 4, 2012
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, Nov. 23, 2008 07:07 am
first you need to get your origins like a variable.

Quote:
main()
{
thread plane_slider ();
}

plane_slider ()
{
script_origin1 = getent ("s1","targetname");
plane = getent ("plane", "targetname”);
trig = getent ("plane_trigger ", "targetname”);
while (1)
{
trig waittill ("trigger");
plane moveto (script_origin1.origin, 10);
plane waittill ("movedone");
wait (4);
plane movez ();
plane waittill ("movedone");

}
}



in the black lines, at movez, you can't add origins, beacuse it moves on the z vector.

edited on Nov. 23, 2008 02:09 am by Slipknot14
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Sunday, Nov. 23, 2008 01:04 pm
Ok, thanks very helpful =D


thanks ukdjaj[thumbs_up]
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Sunday, Nov. 23, 2008 01:22 pm
Ok, just so i know i have got this right... is this script right for the plane following the two script origins without stoping. so it goers to origin 1 then to origin 2 without it stoppign to the eye.

Code:
main()
{
thread plane_slider ();
}

plane_slider ()
{
script_origin1 = getent ("s1","targetname");
script_origin2 = getent ("s2","targetname");
plane = getent ("plane", "targetname”);
trig = getent ("plane_trigger ", "targetname”);
while (1)
{
trig waittill ("trigger");
plane moveto (script_origin1.origin, 10);
wait (0.1)
plane moveto (script_origin2.origin, 10);
}
}



thanks ukdjaj
Share |
Restricted Access Topic is Locked 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

»