Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Generating NPCs (And making sure they actually interact with the room properly)
New Topic New Poll Post Reply
Poster Message
Dying Flutchman
Level: Smiter
Avatar
Rank Points: 406
Registered: 01-27-2017
IP: Logged
icon Generating NPCs (+1)  
Hi forum friends,

I'm finalising a hold with quite some scripting. The final level will feature generated NPCs. However, upon generation, they will not interact with the room tiles. For instance: I can push the NPC into a pit and it disappears. However, generating an NPC on a pit tile works and the NPC is suspended in thin air. This also seeks to be the case for normal monsters.

Now I could out course check the target tile for placement suitability, but that's quite convoluted, since there are many options: open/closed doors, pits, water, hot tiles etc. that all required separate actions. So does anybody know this problem and of possible solutions? I was thinking along the line of generating first and then moving the NPC, but didn't get this to work.

Amy suggestions would be appreciated.

____________________________
Autocorrect is not my friend. Apologies for the typos.

[Last edited by Dying Flutchman at 01-25-2019 12:55 PM]
01-25-2019 at 12:55 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2668
Registered: 07-11-2014
IP: Logged
icon Re: Generating NPCs (+1)  
I believe the convoluted solution is the only way, meticulously checking for every invalid option before spawning the NPC (or alternatively, checkingbfor valid options might be a smaller list, depends on your rooms).
01-25-2019 at 01:00 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dying Flutchman
Level: Smiter
Avatar
Rank Points: 406
Registered: 01-27-2017
IP: Logged
icon Re: Generating NPCs (0)  
Thanks for the quick reply! I'll take the long winding road, then.

____________________________
Autocorrect is not my friend. Apologies for the typos.
01-25-2019 at 01:09 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Generating NPCs (+1)  
Well, you could always give the NPC that's being generated a section at the top of its code like "check if I'm on a pit/water/whatever and if so, fall". There might be a one-turn delay depending on Things, but it would at least fall properly.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 01-25-2019 03:24 PM]
01-25-2019 at 03:17 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dying Flutchman
Level: Smiter
Avatar
Rank Points: 406
Registered: 01-27-2017
IP: Logged
icon Re: Generating NPCs (+1)  
I'll use a bit of both of your advice. Thanks again.

Not bothered by the possibility of a one turn delay. In fact, a one turn delay might actually give interesting puzzle potential on this case...

____________________________
Autocorrect is not my friend. Apologies for the typos.
01-27-2019 at 03:17 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Generating NPCs (And making sure they actually interact with the room properly)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.