Firing Multiple Entities at Once with Wildcards

- By Raeven0
This tutorial was submited on Jan 17, 2005.

Well, it's quite simple, really...

If you send an input to the entity named rae*, then every entity whose name begins with rae will receive the input. That means your game_text named raetext, your info_player_start named raestart, and your monster named raemonster would all receive the input.

However, this is not a true wildcard. If you try to send an input to rae*foo, what do you think would happen? Well, you'd think every entity whose name begins with rae and ends with foo would receive the input. And you'd be wrong.

If you use a wildcard (the *), then everything after the wildcard will be deleted and only the wildcard will remain. That means rae*foo will include raebunnyfoo as well as raetext and raemonster.

Let's look at a practical application. Suppose I have four windows, named window1, window2, window3, and window4. Suppose that I also have a button (func_button) somewhere in the map; when I press this button, I want the windows to break.

So, I'd set up an output for the button:

output OnTrigger
target window*
input Break


When the button is pressed, all four windows will be broken. Useful!

The wildcard will also work in some entity strings, such as a point_template's template. For instance, if you have 35 barrels that you want to spawn all at once, just set the point_template's first template to barrel* and all of the barrels can be spawned simulteously.



Still need help? Ask your questions in one of our HELP FORUMS
Post A Comment
Name:
Email: Links Not Allowed In Comments
Comment:
What is the capital of France? Need Help?
Comments
max - Aug 17, 2007
this just saved my life
All original content ©2006 EditLife.net. All Rights reserved. All files property of their rightful owners.
Get Firefox! Get Thunderbird! Get Notepad++!