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

Members Online

»
0 Active | 56 Guests
Online:

LATEST FORUM THREADS

»
Call of DutyŽ: WWII
CoD WW2 General
SOF2 Prefabs map
SoFII Mapping
coduo mapping tools
CoDUO 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: Personal varibales?
Slipknot14
General Member
Since: Feb 23, 2005
Posts: 109
Last: Sep 4, 2012
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Nov. 22, 2008 02:02 am
I want to make a seal system on my map. You need to activate 2 triggers to activate the 3rd.
So I made it with global varibales, and if functions.
The if check the global variable is true or false then do the right thing. BUT it's works only for 1 ppl, because everybody can change the varibales true or false on the server, so only 1 person need to activate the 2 trigger :D
So I need somethin like a personal script, or varibales that works only at the user.

Quote:
main()
{
level.seal_earth = false;

thread getstarted();
thread sealearth();

}

GetStarted()
{
theseal = getent ("theseal","targetname");
while(1)
{
theseal waittill ("trigger", user);
if (!level.seal_earth){
iprintlnbold("Go and find the seal of ^2earth ^7!");
}
else {
user setOrigin( (126,518,-103) );
}
}
}

SealEarth()
{
trig = getent("seal_earth","targetname");
while(1)
{
trig waittill ("trigger", user);
level.seal_earth = true;
wait 0.01;
}
}


I know this is only 1 seal, and I said 2. But first I want to make this one works, and then solve out the next:)

thanks Creep.

edited on Nov. 22, 2008 04:04 am by Slipknot14

edited on Nov. 22, 2008 04:08 am by Slipknot14
Share |
Slipknot14
General Member
Since: Feb 23, 2005
Posts: 109
Last: Sep 4, 2012
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Nov. 22, 2008 04:49 am
or any ideas for other ways?:S pls help somebody.

Thanks Creep.
Share |
xholyx
General Member
Since: Oct 17, 2007
Posts: 116
Last: Sep 7, 2010
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Nov. 22, 2008 05:29 am
simple, use for each gate or seal a variable
seal 1 = level.seal1
seal 2 = level.seal2
seal 3 = level.seal3

so then if its at the last gate it will only continue if
Code:

if(level.seal1 == true && level.seal2 == true && level.seal3 == true)
  thread opendoor();
else if(!level.seal1)
    self iprintLnbold("Door 1 has to be opened");
else if(!level.seal2)
    self iprintLnbold("Door 2 has to be opened");
else if(!level.sea3)
    self iprintLnbold("Door 3 has to be opened");


use that , will work.

oowh btw, u have to monitor each door, so when they are opened its like :
Code:

door1open()
{
self moveto(blabla);
level.seal1 = true;
}


i think u know how to do all the other stuff, but this is the system how to.
Share |
Slipknot14
General Member
Since: Feb 23, 2005
Posts: 109
Last: Sep 4, 2012
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Nov. 22, 2008 06:46 am
ok I'll try it, thanks.
But I think the same will happens with mine. It works fine, but if 1 ppl find one of the seals, the varibale will be true, so other ppls, don't need to find it. They can easily go through. (It will be a jump map)

edited on Nov. 22, 2008 08:55 am by Slipknot14
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

»