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

Members Online

»
0 Active | 14 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: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Alternative to "waittill"
drofder2004
General Member
Since: Apr 11, 2004
Posts: 207
Last: Mar 12, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 02:50 pm
Hi. I'm looking for a way to detect which trigger was hit preferably without using the "waittill" command.

Is there a way to use an if statement when using triggers, for example...

if(trigger = damage)?

Thanks for any help/suggestions

Drofder
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 03:18 pm
Something along the lines of

trigg = getentarray("whatevertargetname","targetname");
for (j=0;j > trigg.size, j++)
{
if (trigg.classname == trigger_damage)
{
//this is a damage trigger.
}
}
might work. This is just from the top of my head though, I didn;t check the names etc. I'm at work.

However.. you will still have to use the waittil command.. because you will have to tell the engine not to do anything (wait) until (till) the trigger is hit.
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 03:24 pm
I was wondering why you didn't want to use the waittill arguement?
Share |
drofder2004
General Member
Since: Apr 11, 2004
Posts: 207
Last: Mar 12, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 05:24 pm
Yorkshire-Rifles writes...
Quote:
I was wondering why you didn't want to use the waittill arguement?


I dont want to use it, because I want to detect damage to more than 1 trigger. You can only apply a waittill to a single trigger at a time.

Share |
drofder2004
General Member
Since: Apr 11, 2004
Posts: 207
Last: Mar 12, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 05:25 pm
The_Caretaker writes...
Quote:
Something along the lines of

trigg = getentarray("whatevertargetname","targetname");
for (j=0;j > trigg.size, j++)
{
if (trigg.classname == trigger_damage)
{
//this is a damage trigger.
}
}
might work. This is just from the top of my head though, I didn;t check the names etc. I'm at work.

However.. you will still have to use the waittil command.. because you will have to tell the engine not to do anything (wait) until (till) the trigger is hit.


This finds the triggers but it doesnt detect if the trigger takes damage or not. Although I may be able to use this in another way.
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 05:29 pm
No.. the only way for that is the waittill command, for as far as I know.
Share |
drofder2004
General Member
Since: Apr 11, 2004
Posts: 207
Last: Mar 12, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 05:34 pm
The_Caretaker writes...
Quote:
No.. the only way for that is the waittill command, for as far as I know.

Damn, thought that would be the case. I will just have to write multiple threads. Thanks anyways :)
Share |
greyfire
General Member
Since: Apr 27, 2005
Posts: 41
Last: Mar 27, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 05:35 pm
try to do this whit functions. one function for one trigger.
Share |
SparkyMcSparks
General Member
Since: Feb 28, 2004
Posts: 1713
Last: Dec 29, 2016
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 06:02 pm
There's two utility functions:
Code:
waittill_multiple (string1, string2, string3, string4, string5)
Causes an entity to wait for multiple notifies to occur before progressing.

waittill_any (string1, string2, string3, string4, string5)
Causes an entity to wait for any of a collection of strings to be notified.

Is that what you're looking for?

edited on Mar. 27, 2006 01:03 pm by [FR]Sparks
Share |
drofder2004
General Member
Since: Apr 11, 2004
Posts: 207
Last: Mar 12, 2007
[view latest posts]
Level 4
Category: CoD Mapping
Posted: Monday, Mar. 27, 2006 06:09 pm
Ok, ive nearly got this working exactly how I want it.

All I need to know is how to stop a thread running.

For example...

I have 4 threads that run on a single player.
Each trigger waits until it is triggered/damaged
3 of the triggers are dummy triggers and 1 is the real trigger.
If a dummy trigger is triggered, then nothing happens, the script keeps waitting.
Once the correct trigger is hit, then the starting thread is run again. (Basically, I end up with the same threads running on 1 person mulptiple times).

I'm sure the answer lies somewhere in the

"self endon ("finish");"

But can anyone explain how to use that (or the correct way of ending a thread).

In the mean time, I will search through the gametype scripts for the answer :)

Thanks.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoD 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

»