Post new topic    
Metal Slime
Send private message
Is it possible to place NPCs on top of eachother? 
 PostSat Oct 01, 2011 6:23 pm
Send private message Reply with quote
The title is the question. Smile

I want to do this, because i want to make doors that lead -depending on the season- to diffrent places.

I didn't find a "On use door: run script"- thing in the editor and i didn't find much in the plotdictionnary either. All I found was an autorun command, but that would mean the player has to enter a map first and then he is beamed to the right map, I guess.

So, I wanted to use the NPC as fake doors, that lead to different version of the same map depending on what tag is set on.
Of couse, the diffrent door should always be on the same place.

I hope you can help me.
Maybe you have a better idea handeling season in game?
Reigning Smash Champion
Send private message
 
 PostSat Oct 01, 2011 6:34 pm
Send private message Reply with quote
To place NPCs on top of each other you can hold Ctrl + Direction to place instead of just spacebar. Ctrl + Spacebar might work too I don't know.

I'm really not sure how that applies to your scenario, so I'm hoping this is the answer you're looking for and the question is not about something different.
Metal Slime
Send private message
 
 PostSat Oct 01, 2011 7:05 pm
Send private message Reply with quote
Thanks! It works! Smile
Slime Knight
Send private message
 
 PostSat Oct 01, 2011 10:54 pm
Send private message Reply with quote
while it will work just fine to have different NPCs show up with different tags, each with a script linking you somewhere different, its probably easier to do it with plotscripting.

Code:
plotscript, usedoorNPC1, begin
if (checktag (TAG)) then (
 use door (0)
) else (
 if (checktag (TAG2)) then (
  use door (1)
 )
)
end


this way its one NPC per doorway, and the script does all the tag checking for you. But either way will work.

i am 99% positive you can set up door links for plotscripts and not place the door anywhere on the map... if not, well, i'd put them somewhere the person can't get to, hidden by walls.

i am assuming this is the same script that you are having trouble with in the other thread?
Metal Slime
Send private message
 
 PostSun Oct 02, 2011 9:05 am
Send private message Reply with quote
Thank you! Grin
I tested your script and i'll use it!
And, yes it was the script I had trouble with.

All in all, the three scripts didn't do what i wanted during the last days.
It started to get a little frustraiting.
But you helped me to find the (hopefully) last pice of the puzzle!

Now I can move the hero from inside the house outside, on a snowy map in winter time and a normal map for spring time!

I'm so happy that this works now! Smile
Thanks for your help!
Metal King Slime
Send private message
 
 PostSun Oct 02, 2011 2:55 pm
Send private message Reply with quote
Heh. This is actually a built in feature, there's no need to use scripting or step-on NPCs. In the "Link doors" menu you can attach multiple links to each door and add tag conditions to the door links: requiring that one or two tags are set on or off. When you step on the door the first link for that door (going from the top of the menu to the bottom) for which the tag conditionals are met is used. If no door links are enabled, then the door does nothing.
Metal Slime
Send private message
 
 PostMon Oct 03, 2011 3:00 pm
Send private message Reply with quote
@ TMC: Thanks for your answer. Smile

I need to use 4 Tags wich are either on or off. And there are only two conditional door links. That's why I came up with NPCs.
I guess I could have handled 4 different doorlinks with the following 4 conditions: Tag 1= true, Tag 1= false,Tag 2=true, or Tag 2=false.

But I didn't think of that in the beginning, so in the season-check script each season has a tag with it's name (winter, summer, spring, autumn).
I don't know which method will work better, i'll just try and see how far I get with NPC-fake-Doors...

The bad thing is that I need to plan all the doorlink-data and maps and NPCs. The good thing I that if I later need more conditions or links I can just add them in the NPC's script.
Display posts from previous: