Sarge
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Player-Specific Script Executions?
 
Author
All times are GMT. The time now is 04:09. Post New Thread    Post A Reply
chubz
Blackfish changed my title again


Posts: 320
Registered: 07-04


Hey guys,

This is my first post in forever here at DoomWorld and I just had a quick question to ask for those of you who have been using Doom Builder (2) for a lengthy amount of time and have become comfortable with the ACS scripting you can use in conjunction with it:

How would I go about creating a team-based multiplayer map in which players on two separate teams trigger scripts that act separately for each player and have different consequences depending on the team to which they've been assigned? For example, let's say I want to have two teams - red and blue - and members of these two teams must stand in a specific area for a certain amount of time to 'capture' a point for their side.

I've coded the capture mechanic for one player and it works fine, but how would I go about determining which team the player is on and only triggering the script if:
- A Blue player steps into a Red zone
- A Red player steps into a Blue zone

Whereas any other scenario (A blue player stepping into a blue zone or vice versa) is totally ignored. Think of it as a Battlefield 1942-like clone, but rather than standing under flags you're standing in specific circular zones.

I guess what I'm asking in a much shorter form is how do you write a script that can determine which exact player is triggering that script and which team that player is on? I've tried giving my players Thing ID numbers but those don't seem to have the correct effects. It's as if the identification numbers sort of "roll off" and are totally ignored when given to Player Start things. Perhaps I'm missing something or just on the wrong track all-together?

Thank you for any suggestions and advice and I apologize if this question(s) is not clear or specific enough for you to offer assistance. I did my best to explain!

I would like to add that even understanding how to create a simple two-player co-op map in which each player triggers a script with different consequences would be a triumph for me and would move me forward in the right direction. Even this is something I'm not totally sure how to do because of the identification number problem I mentioned in the paragraph before the last. Both problems tend to fall into the same category, however, so I figured I would throw that one in there just in case it would be easier to explain rather than getting into the whole red/blue team capture-point thing.

Last edited by chubz on 01-12-10 at 05:16

Old Post 01-12-10 05:11 #
chubz is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Planky
Senior Member


Posts: 1191
Registered: 12-02


I imagine the GetPlayerInfo and ActivatorTID functions will cover what you need. Query ActivatorTID to ensure the script activator is a valid player and then use GetPlayerInfo to find out what team the player is on.

Old Post 01-13-10 02:43 #
Planky is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 04:09. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Player-Specific Script Executions?

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.