[ACS] Placing an object in a random spot in the map?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Recurracy
Posts: 545
Joined: Fri Dec 19, 2008 12:11 pm

[ACS] Placing an object in a random spot in the map?

Post by Recurracy »

Hello,

I'd like to know if it would be possible to place an object somewhere in a random spot in the map. This part would be pretty easy I assume. The part that would be much less easy is that it has to be reachable by the player. Is it possible to check for something like that somehow?
User avatar
KeksDose
 
 
Posts: 595
Joined: Thu Jul 05, 2007 6:13 pm
Contact:

Re: [ACS] Placing an object in a random spot in the map?

Post by KeksDose »

If you're willing to replace things like weapons, keys, powerups, that kinda stuff which tends to be in pretty good spots, you could use decorate to relay their positions to acs and make another script select one of those positions randomly. Then you can spawn something there.

Otherwise, I don't think it's feasibly possible to use acs to select some position and then be able to determine that the player can get there. acs can't even tell whether something is inside or outside a "room shape".
Post Reply

Return to “Scripting”