Post new topic    
Slime Knight
Send private message
Question about placing NPCs 
 PostTue Apr 16, 2013 6:07 pm
Send private message Reply with quote
Sorry for the trouble, but is there a rule that you can't place NPCs on walls or something? I'm trying to have invisible one-time use NPCs inside my drawers that contain items to give you the textbox/item on use, but they won't appear (they aren't invisible right now, obviously). I tried putting them other places and they will appear and work properly.

Any idea what's going on? Or is it just that I'm not allowed to have them in walls?

Thanks in advance!
You can't fix stupidity.
Liquid Metal King Slime
Send private message
 
 PostTue Apr 16, 2013 6:44 pm
Send private message Reply with quote
You're totally allowed to have them in walls. Something else must be causing it.
My only real thought would be maybe your wall tiles are an overlapping layer and just causing you not to see the npcs. Have you actually tried just using them?
Or perhaps you're having them use a tag that's being used by something else already. If you want different npc's to give the same items, you still need to make a new npc each time you place it on the map, otherwise once 1 is used they will all disappear.

That's all I can think of right now, I'd really need more information to help you unfortunately.
Slime Knight
Send private message
 
 PostTue Apr 16, 2013 7:58 pm
Send private message Reply with quote
Hmm, yea- I've tried using them in case they were behind a layer, and they are set to "always" be available, just as a one-use thing.

Here is some info I can say (maybe some of it will help discern the problem?)

-I have a "new game" script that moves my hero and teleports him downstairs essentially. Then, if you go back upstairs after the script has ended, the drawers should have the item. It's pretty much just not allowing me to put them inside the wall-mapped drawer tile. I've experimented with other tiles and it seems to work. I'll have more info as I test it more.

Thanks a lot, man!

EDIT: Okay, new edit- the only places they CAN'T be are the drawers on the screen the game enters on. They can be anywhere else on that screen, and in any drawers in any other location on any map. For some reason, it is just breaking there. There isn't anything special about the tiles, either...
You can't fix stupidity.
Liquid Metal King Slime
Send private message
 
 PostTue Apr 16, 2013 8:07 pm
Send private message Reply with quote
Do they show up in custom when you place them using the map editor?
Liquid Metal King Slime
Send private message
 
 PostTue Apr 16, 2013 9:09 pm
Send private message Reply with quote
Maybe it's that script you were talking about, posting it might help.

That or it's some sort of engine bug, though I don't think that to be the case.
Metal King Slime
Send private message
 
 PostTue Apr 16, 2013 9:33 pm
Send private message Reply with quote
There is a debug key that isn't well known that may help: Ctrl+F11 shows the positions of all NPC instances, including NPCs that have been disabled due to either tag conditions or one-time-used tags (they show up with negative ID numbers). Top numbers are IDs, bottom are (negated) references.
Slime Knight
Send private message
 
 PostWed Apr 17, 2013 12:05 am
Send private message Reply with quote
I'm 99% sure the script doesn't mess it up, but I will post it:

plotscript, new game, begin

RevCost := 25
steps := 1

suspend player

show text box(1)
wait for text box
show text box(2)
wait for text box
show text box(3)
wait for text box

walk hero(0, east, 9)
wait for hero(0)
walk hero(0, south, 2)
wait for hero(0)
walk hero(0, east, 6)
wait for hero(0)
walk hero(0, north, 3)
wait for hero(0)

fade screen out(63, 63, 63)
wait(30)
teleport to map(2, 28, 73)
add hero(6)
walk hero(0, south, 1)
wait for hero(0)
walk hero(0, north, 1)
wait for hero(0)
fade screen in

show text box(4)
wait for key (use key)
show text box(5)
wait for key (use key)
show text box(6)
wait for key (use key)
show text box(7)
wait for key (use key)
show text box(8)
wait for key (use key)
show text box(9)
wait for key (use key)
show text box(10)
wait for text box

fade screen out(63, 63, 63)
destroy NPC(6)
set tag(4, on)
set tag(6, on)

wait(10)
fade screen in

resume player


end

Thanks again. And I will try your suggestion now, TMC!
You can't fix stupidity.
Slime Knight
Send private message
 
 PostWed Apr 17, 2013 12:06 am
Send private message Reply with quote
uh, nevermind. It works now- I have no idea what happened, but I didn't change anything. It works though, so all good haha!
You can't fix stupidity.
Slime Knight
Send private message
 
 PostWed Apr 17, 2013 12:29 am
Send private message Reply with quote
Uh-oh, new problem!

Well, more of a lack of ability to script well. So here it is: I have in place a night-day script that basically just changes the day to night and vice-versa every so many steps.

The problem, is that if it's night time, and I log out, the palette doesn't stay darker, and so when you go back into the game, it looks like it's day, when it is in fact night.

I'll think about different ways to go about fixing it, but none come to mind immediately, so I was wondering if you guys could share some secrets!

Thank you, once again haha!
You can't fix stupidity.
Liquid Metal King Slime
Send private message
 
 PostWed Apr 17, 2013 2:48 am
Send private message Reply with quote
Well, you could have a new game or load game script that checks that, and basically loads the other script up when you start the game.
Slime Knight
Send private message
 
 PostWed Apr 17, 2013 1:56 pm
Send private message Reply with quote
Ooooh okay, did not know there was a load game script! That's awesome!

Thanks a bunch spoon! Sorry for the noob questions and there will probably be more to come haha!
You can't fix stupidity.
Display posts from previous: