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

Members Online

»
0 Active | 74 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: trigger to start a rotation
bubbazan68
General Member
Since: May 23, 2010
Posts: 62
Last: Oct 2, 2016
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Thursday, Feb. 7, 2013 07:14 pm
using the tride and true method for a rotation, but i need to add a trigger so it does not start untill you trigger it.

any one?

Code:
main()
{
rotate_obj = getentarray("ring","targetname");
if(isdefined(rotate_obj))
{
for(i=0;i {
rotate_obj[i] thread ra_rotate();
}
}
}

ra_rotate()
{
if (!isdefined(self.speed) || self.speed == 0)
self.speed = 8.5;
if (!isdefined(self.script_noteworthy))
self.script_noteworthy = "y";

while(true)
{
// rotateYaw(float rot, float time, , );
if (self.script_noteworthy == "y")
self rotateYaw(360,self.speed);
else if (self.script_noteworthy == "x")
self rotateRoll(360,self.speed);
else if (self.script_noteworthy == "z")
self rotatePitch(360,self.speed);
wait ((self.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
}
}code]
Share |
bubbazan68
General Member
Since: May 23, 2010
Posts: 62
Last: Oct 2, 2016
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Feb. 10, 2013 10:11 pm
61 views and no one?
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Monday, Feb. 11, 2013 05:52 am
trig=getent("Trigger_Name","targetname");

then add in 'trig waittill ("trigger");' ?

Is that all you're asking?

Thanks, Ukdjaj[thumbs_up]
Share |
bubbazan68
General Member
Since: May 23, 2010
Posts: 62
Last: Oct 2, 2016
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Monday, Feb. 11, 2013 06:12 pm
what i am or am trying to do is with the rotation script that i posted were would i put or change it for

trig=getent("Trigger_Name","targetname");

then add in 'trig waittill ("trigger");


so the rotation will not start untill triggered
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Tuesday, Feb. 12, 2013 07:29 am
Code:
main()

{
	trig = getent ("rotate_trig","targetname");
	rotate_obj = getentarray("ring","targetname");

	trig waittill ("trigger");
	if(isdefined(rotate_obj))

	{

		for(i=0;i
		{

			rotate_obj[i] thread ra_rotate();

		}

	}

}



ra_rotate()

{

	if (!isdefined(self.speed) || self.speed == 0)

		self.speed = 8.5;

	if (!isdefined(self.script_noteworthy))

		self.script_noteworthy = "y";



	while(true)

	{

		// rotateYaw(float rot, float time, , );

		if (self.script_noteworthy == "y")

			self rotateYaw(360,self.speed);

		else if (self.script_noteworthy == "x")

			self rotateRoll(360,self.speed);

		else if (self.script_noteworthy == "z")

			self rotatePitch(360,self.speed);

		wait ((self.speed)-0.1); 

	}

}


Something like that i imagine, this will be endless though, call the trigger "rotate_trig"

Thanks, Ukdjaj[thumbs_up]
Share |
bubbazan68
General Member
Since: May 23, 2010
Posts: 62
Last: Oct 2, 2016
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Tuesday, Feb. 12, 2013 10:48 pm
thanks i will give it a whirl [rolleyes] [rocking]
Share |
bubbazan68
General Member
Since: May 23, 2010
Posts: 62
Last: Oct 2, 2016
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Thursday, Feb. 14, 2013 10:52 pm
undefined is not an object
trig waittill ("trigger");
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Friday, Feb. 15, 2013 02:42 am
Have you got trig = getent("trigger","targetname"); ?

It seems as though it isn't picking up the line? I am not fluent in call of duty commands, and i have no base scripts to look at to check spelling and things, so i do not know :O

Thanks, Ukdjaj[thumbs_up]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

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

»