[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!)

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

Postby Recurracy » Tue May 10, 2022 6:23 pm

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
Recurracy
I develop primarily for Zandronum
 
Joined: 19 Dec 2008

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

Postby KeksDose » Wed May 11, 2022 1:25 pm

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".
User avatar
KeksDose
Praise Mima and the Moon
 
 
 
Joined: 05 Jul 2007


Return to Scripting

Who is online

Users browsing this forum: brick, SPZ1 and 0 guests