I am a complete newbie when it comes to ACS. I understand the basics, but I just can't seem to figure out if this is possible. Is there a way to bind a function to a tag? I.e., have a LINEDEF with a sector tag, and when the user hits it, it triggers a function in addition to its normal action.
It seems to me that this would be far easier than calling a function that calls a bunch of other functions. All I want to do is display some text like "a platform raised in the other room" when the player flips a switch, in addition to actually raising the platform.
			
			
									
						
										
						ACS - Simple Text Message
					Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
	Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Graf Zahl
 - Lead GZDoom+Raze Developer

 - Posts: 49252
 - Joined: Sat Jul 19, 2003 10:19 am
 - Location: Germany
 
Re: ACS - Simple Text Message
John Gaughan wrote:I am a complete newbie when it comes to ACS. I understand the basics, but I just can't seem to figure out if this is possible. Is there a way to bind a function to a tag? I.e., have a LINEDEF with a sector tag, and when the user hits it, it triggers a function in addition to its normal action.
It seems to me that this would be far easier than calling a function that calls a bunch of other functions. All I want to do is display some text like "a platform raised in the other room" when the player flips a switch, in addition to actually raising the platform.
Each line can only have one function. Executing a script is one. In your case you will have to perform your main action in the script. Where's the problem because you'd need the script anyway for printing your message?
Of course you could add a second linedef with a passthru flag so one activates your action and the other your script but that is so much more complicated than simply doing all your stuff in the script that it really isn't worth it.
- 
				John Gaughan
 
Hey, I'm just a computer programmer! Oh, nevermind... 
Anyway, I am new to ACS. Whenever I learn a new language I am always lost at first. I'll get it eventually.
It would be nice to have this compatible with ports such as PrBoom. As awesome as ZDoom is, not everyone likes it. Oh well. I'd rather have less ambiguity in places (like switches where you have no clue what they do).
			
			
									
						
										
						Anyway, I am new to ACS. Whenever I learn a new language I am always lost at first. I'll get it eventually.
It would be nice to have this compatible with ports such as PrBoom. As awesome as ZDoom is, not everyone likes it. Oh well. I'd rather have less ambiguity in places (like switches where you have no clue what they do).
- Graf Zahl
 - Lead GZDoom+Raze Developer

 - Posts: 49252
 - Joined: Sat Jul 19, 2003 10:19 am
 - Location: Germany
 
In other words: Something like Phobos: Anomaly Reborn is shit, right?HotWax wrote:ZDoom supports Boom extensions. If you just avoid using ACS scripts, and slopes, and stealth monsters, and KEYCONF, and DECALDEF, and ANIMDEFS, and.. you know... other awesome stuff, then you can make a level compatible with Boom/PRBoom and ZDoom.
And we'll all laugh at you.
Restricting oneself to a lower standard does not automatically make a level bad - even though they can't compete with the truly impressive stuff.