
03-14-2002, 03:13 AM
|
|
Registered User
|
 |
Join Date: Mar 2001
Posts: 7,989
|
|
Re: Re: problem w/ setmap & startswith()
Quote:
Originally posted by konidias
NPC Code:
if (playerenters) {
setmap quest.png,quest.txt,playerx,playery;
toweapons -questmap;
}
if (isweapon && startswith(quest_,#L)) {
setmap quest.png,quest.txt,playerx,playery;
}else if (isweapon && !startswith(quest_,#L)) {
setmap overworld.png,overworld.txt,playerx,playery;
}
"else if (isweapon && !startswith(quest_,#L)) {"
You had it basically saying "If you have the weapon, set the map to overworld.png" that is why it kept setting to overworld.. you have to define that it only sets overworld.png when you have the weapon and the levels dont start with quest.
You could simplify this by having something like "if (isweapon)" then have an "if startswith blahblah" here and then just have an else for it instead of having an else if !startswith blahblah" but what I posted should work fine lol.
|
Thanks alot! That worked... I'm sure some of the other things the others suggested would've worked as well, thanks to them too...  |
|
|
|