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

Members Online

»
0 Active | 6 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 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: Message Posting Problem :D
links
General Member
Since: May 4, 2004
Posts: 146
Last: Apr 3, 2005
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Friday, Mar. 25, 2005 06:54 pm
Hey guys another problem...

So I don't get the damn sounds working so I decided to make it on another (and in my opionion better way) with text messages!

So far so good. All works fine WITH 1 message but I I have a problem...
I want that the message1 comes when I activate the elevator and message2 when I activate the elevator a second time (And this everytime)
But I don't get it work I try some things but now it's only the "start script"

So I added the "waittill" function but what then? Is there some way to say the game "Only if the trigger was activated 2 times you start with your message"

Hope somebody can help me

Cya


main()

{
level.elevatorDown = true;
level.elevatorMoving = false;
thread elevator_start();
thread message1();
thread message2();
}

elevator_start() {
elevator = getentarray ("mytrigger1","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 ("mybrushmodel1", "targetname");
level.elevatorMoving = true;
speed = 2;
height = 92;
wait (6);
if (level.elevatorDown) { // moves to top
elevatormodel playsound ("elevator1");
wait (1);
elevatormodel moveZ (height, speed);
elevatormodel waittill ("movedone");
level.elevatorDown = false;
}
else { // moves to bottom
elevatormodel playsound ("elevator1");
wait (1);
elevatormodel moveZ (height - (height * 2), speed);
elevatormodel waittill ("movedone");
level.elevatorDown = true;
}
level.elevatorMoving = false;
}

message1()
{
messagetrig = getent ("mytrigger1","targetname"); messagetrig waittill ("trigger");
iprintlnbold ("The Arena was activated");

iprintlnbold ("aaa1");
wait (1);
iprintlnbold ("aaa2");
wait (1);
iprintlnbold ("aaa3");
wait (1);
iprintlnbold ("aaa4");
wait (1);

iprintlnbold ("TEXT5");
thread message1();
}

message2()
{
message2 waittill ("mytrigger1");
messagetrig = getent ("mytrigger1","targetname"); messagetrig waittill ("trigger");
iprintlnbold ("xxx1");

iprintlnbold ("xxx2");
wait (1);
iprintlnbold ("xxx3");
wait (1);

iprintlnbold ("xxx4");
thread message2();
}
Share |
links
General Member
Since: May 4, 2004
Posts: 146
Last: Apr 3, 2005
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Sunday, Mar. 27, 2005 11:48 am
Nobody??? Come on guys :D

This is not to hard or?
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoDUO Mapping
Posted: Sunday, Mar. 27, 2005 03:40 pm
not saying this is exactly what you will have in the end...but i am going to ramble off a script here - it should give you an idea - then you need to implement it into your own script
Code:
trigger_counter ()
{
get_trigger = getent ("mytrigger1","targetname");
t_counter = 0;
get_trigger waitill ("trigger");
t_counter = t_counter++;
if (t_counter == 1)
thread play_message1;
if (t_counter == 2)
thread play_message2;
}


the above script isnt perfect, but it should give you an idea of how to proceed [angryalien]
Share |
links
General Member
Since: May 4, 2004
Posts: 146
Last: Apr 3, 2005
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Sunday, Mar. 27, 2005 04:44 pm
Oh that's a good thing I think ;)

How you "Scripting Guys" get ideas like that???

btw I have another question:

Anyway to move a trigger hurt like a elevator? :D

Cya
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoDUO Mapping
Posted: Sunday, Mar. 27, 2005 04:54 pm
i havent played with this...but you "may" be able to move a trigger using scripting, by getting the trigger origin, then moving it the same as a script_brushmodel [angryalien]
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

»