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

Members Online

»
0 Active | 79 Guests
Online:

LATEST FORUM THREADS

»
run artillery on maps
CoD+UO Map + Mod Releases
Call of Duty®: WWII
CoD WW2 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: 2 scripts zusammenfügen
Phoenix2012
General Member
Since: Mar 12, 2012
Posts: 5
Last: Mar 23, 2015
[view latest posts]
Level 0
Category: CoDUO Mapping
Posted: Saturday, Mar. 21, 2015 10:49 am
Guten tag ich bastel seit geraumer zeit an stargates maps,
nun möchte ich gerne eine portal script mit nen elevator script Kombinieren nun bin ich leider nicht so helle was scripten angeht!
mein elevator script soll 5 ringe von unten nach oben bewegen sind die ringen oben angekommen soll mein portal script aktiviert werden

ELEVATOR Script

main()
{
level.elevatorDown = true; // elevator starts at bottom: true/false
level.elevatorMoving = false; // elevator is not currently moving
thread elevator_start();
}

elevator_start()
{
elevator = getentarray ("elevatorswitch","targetname");
if ( isdefined(elevator) )
for (i = 0; i < elevator.size; i++)
elevator thread elevator_think();
}

elevator_think()
{
while (1)
{
self waittill ("trigger");
if (!level.elevatorMoving)
thread elevator_move();
}
}

elevator_move()
{
elevatormodel = getent ("elevatormodel", "targetname");
level.elevatorMoving = true;
speed = 2; // speed of elevator – higher value = slower
height = 70; // distance in worldunits for elevator to go on z-axis
wait (1);
if (level.elevatorDown)
{
elevatormodel playsound ("elevator1"); // name in soundaliases csv
wait (1);
elevatormodel moveZ (height, speed);
elevatormodel waittill ("movedone");
level.elevatorDown = false;
}
else
{
elevatormodel playsound ("elevator1");
wait (1);
elevatormodel moveZ (height - (height * 2), speed);
elevatormodel waittill ("movedone");
level.elevatorDown = true;
}
level.elevatorMoving = false;
}





PORTAL Script


main()
{

entTransporter = getentarray("enter","targetname");
if(isdefined(entTransporter))
{
for(lp=0;lp }


}


Transporter()
{
while(true)
{
self waittill("trigger",other);
entTarget = getent(self.target, "targetname");

wait(6.10);
other setorigin(entTarget.origin);
other setplayerangles(entTarget.angles);
wait(6.10);
}
}


Könnte mir jamand da behilflich sein?

MFG: Phoenix2012
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: CoDUO Mapping
Posted: Sunday, Mar. 22, 2015 12:15 pm
Please post in english when using the forums. Thank you.
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11656
Last: Jul 3, 2019
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoDUO Mapping
Posted: Sunday, Mar. 22, 2015 02:06 pm
Mystic writes...
Quote:
Please post in english when using the forums. Thank you.
or at least try... most of our members use english to convey their problems and solutions; though there have been some other languages used to varying success

[angryalien]
Share |
Phoenix2012
General Member
Since: Mar 12, 2012
Posts: 5
Last: Mar 23, 2015
[view latest posts]
Level 0
Category: CoDUO Mapping
Posted: Monday, Mar. 23, 2015 06:29 am
Guten tag ich bastel seit geraumer zeit an stargates maps,
nun möchte ich gerne eine portal script mit nen elevator script Kombinieren nun bin ich leider nicht so helle was scripten angeht!
mein elevator script soll 5 ringe von unten nach oben bewegen sind die ringen oben angekommen soll mein portal script aktiviert werden

Good day I craft for quite some time to stargate maps,
Now I would like to have a portal script with an elevator script Combine now I'm not so bright in terms of scripting!
my elevator script to 5 rings from the bottom up move are struggling to reach the top are my guide is not activated.

PS: I hope that Google applies sufficient ?!



ELEVATOR Script

Code:
main()
{
	level.elevatorDown = true; // elevator starts at bottom: true/false
	level.elevatorMoving = false; // elevator is not currently moving
	thread elevator_start();
}

elevator_start()
{
	elevator = getentarray ("elevatorswitch","targetname");
	if ( isdefined(elevator) )
	for (i = 0; i < elevator.size; i++)
	elevator[i] thread elevator_think();
}

elevator_think()
{
	while (1)
	{
		self waittill ("trigger");
		if (!level.elevatorMoving)
		thread elevator_move();
	}
}

elevator_move()
{
	elevatormodel = getent ("elevatormodel", "targetname");
	level.elevatorMoving = true;
	speed = 2; // speed of elevator – higher value = slower
	height = 70; // distance in worldunits for elevator to go on z-axis
	wait (1);
	if (level.elevatorDown)
	{
		elevatormodel playsound ("elevator1"); // name in soundaliases csv
		wait (1);
		elevatormodel moveZ (height, speed);
		elevatormodel waittill ("movedone");
		level.elevatorDown = false;
	}
	else
	{
		elevatormodel playsound ("elevator1");
		wait (1);
		elevatormodel moveZ (height - (height * 2), speed);
		elevatormodel waittill ("movedone");
		level.elevatorDown = true;
	}
	level.elevatorMoving = false;
}






PORTAL Script


Code:
main()
{

entTransporter = getentarray("enter","targetname");
if(isdefined(entTransporter))
{
for(lp=0;lp<entTransporter.size;lp=lp+1)entTransporter[lp] thread Transporter();
}


}


Transporter()
{
while(true)
{
self waittill("trigger",other);
entTarget = getent(self.target, "targetname");

wait(6.10);
other setorigin(entTarget.origin);
other setplayerangles(entTarget.angles);
wait(6.10);
}
}

GERMAN
Also wen ich den trigger schalter aktiviere dann soll mein elevator zu der position hoch fahren den ich angegeben habe,dann soll das zweite script ausgelöst werden! was ist portal script ist.
nur bekomme ich leider beide scripts nicht in einer gsc rein.

ENGLISCH
So who do I activate the trigger switch then shall my elevator ride up to the position which I have stated, then the second script to be triggered! what is a portal script.
I get only unfortunately neither of scripts in a gsc pure.

MFG: Phoenix2012

edited on Mar. 25, 2015 12:38 am by Mystic - added code boxes
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

»