Original message
| Da Snoop melloun@email.cz | "How to write a decission?" , posted Fri 18 May 08:32  
I want to use two switches in a decission (if). For example: the player must flip main generator and then operate switch near pit to raise the bridge. If the player won't switch on the generator, the switch controlling the bridge will do nothing. If generator is turned on, the bridge-switch will rise the bridge. I think that this is possible, but I don't know the variables. How to declare two switches? How does ZDoom recognize, that I mean "these" two switches, not the other? Variable sw1 or sw2 etc., used in some tutorial, doesn't work.
BTW: What are all variables, supported by ZDoom or how to make my own variable (mytexture, mysound etc.)?
Thanx for help. :-}
Minigun is my favorite weapon ;)
| | Replies:
|
| Wildman GOD ON EARTH rickclark58@yahoo.com | "Re(1):How to write a decission?" , posted Fri 18 May 18:32  
Loser (who isn't :) hit the nail on the head. His scripts should work just fine.
I just wanted to mention the ACS Script Primer I have on the ZDoom Knowledge Base. It will give you an introduction to scripting that may help you.
Rick Clark Just Some Guy
|
| loser | "Re(1):How to write a decission?" , posted Fri 18 May 16:34:  
With ACS scripts, this is easy to implement. Write two scripts, something like:
int generator; // declaration
script 10 ( void ) { generator = 1; print ( s: "Generator on" ); }
script 11 ( void ) { if ( generator != 0 ) { // raise or lower the floor, etc... } }
Then assign script 10 to the generator switch, and script 11 to the bridge switch (ACS_Execute special, first parameter is the script number).
[this message was edited by loser on Fri 18 May 16:36] |
| | Lüt Albino Negro  toruonda@home.com 23065834
| "Re(2):How to write a decission?" , posted Fri 18 May 19:17  
How can that work, at least half the stuff the game needs to know is missing?
--- You have been bothered by: Lüt "Living Colour is my favorite black metal band." www.doomworld.com/insanity www.mp3.com/dyingcorpse www.thebarnacle.f2s.com AIM: Dying Corpse - SB4824 - XtbbTSzNyKw5sRB4 <-- Talk to me dammit!
|
| Lazer  -@-.com
| "Re(1):How to write a decission?" , posted Fri 18 May 11:34  
It is somewhat tricky to do. I know how to do it without scipting. You simply make a see-through door 1 pixel away from the switch that raises the bridge, then make the "power generator switch" open the see-through door. This lets you activate the switch now. I haven't tried it, but it should work.
Current Projects: Underworld The Doom Down Under Website: www.devin-afshin.com/DDU/DDUMain.htm
|
|
|