View previous topic :: View next topic |
Author |
Message |
RedMaverickZero Three pointed, red disaster! Halloween 2006 Creativity Winner


Joined: 12 Jul 2003 Posts: 1459
|
Posted: Fri Nov 23, 2007 7:40 am Post subject: Moving a vehicle's set position manually |
|
|
I'm at a part in my game where the player goes to the oppisite side of the map, but I need the vehicle to appear there when he gets there. Is there a way I can do this??? I thought I could do it in a cheap way and just set the NPC position to that spot, but when I used a door and returned to the map it didn't work. Anyone got any ideas? I'd be really appreciative, cause I can't figure this out at all. _________________ ---------------Projects----
Mr.Triangle's Maze: 70%
Takoyaki Surprise: 70% |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri Nov 23, 2007 6:15 pm Post subject: |
|
|
This seems like a typical place to use tags to hide/show npcs (unless you don't want to waste an NPC), though the script approach works too:
That should work, as long as you always run the script before the player gets to that area, every time they enter the map, instead of just running the script once and letting the player leave the map.
For instance, you could include in the map autorun script, or put some invisible step on npcs in the path to that area, to run the script to move the vehicle npc. You'll probably use a tag to indicate that the vehicle needs moving?
Note: saving NPC map state isn't a good solution here, because that doesn't persist through saved games. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
RedMaverickZero Three pointed, red disaster! Halloween 2006 Creativity Winner


Joined: 12 Jul 2003 Posts: 1459
|
Posted: Fri Nov 23, 2007 6:19 pm Post subject: |
|
|
I... I don't understand exactly... Sorry, heh.
Wait, I kinda get it... I'm settting up in my autorun script for my world map that if a certain tag is on to set an NPC position. However, I need it to only work if tag 56 is off.
if(
(checktag (56) ==-1)
then(
if(
(checktag (87) == 1)
then(set NPC position (5,44,45)
wait (2)
)
So... what exactly do I write for this to add in to make it work only if tag 56 is off? (I know that doesn't work what I'm showing, but it's the general idea...) _________________ ---------------Projects----
Mr.Triangle's Maze: 70%
Takoyaki Surprise: 70% |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri Nov 23, 2007 8:44 pm Post subject: |
|
|
You can write "check tag (56) == false" or "check tag (56) == 0" or "not (check tag (56))"
So you want it to only work if tag 56 is on, and tag 87 is off, right? There shouldn't be any reason to put in wait commands.
Code: | if (checktag (56) == false && checktag (87))
then(set NPC position (5,44,45)) |
(Remember to also run the setNPCposition command when you turn on the tag) _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
RedMaverickZero Three pointed, red disaster! Halloween 2006 Creativity Winner


Joined: 12 Jul 2003 Posts: 1459
|
Posted: Sat Nov 24, 2007 7:25 am Post subject: |
|
|
This script works beautifully...
EXCEPT...
The tag 56 I mentioned is the tag that is set on while the player is riding the vehicle. So when I use the vehicle to get to the other side of the mountains and use a door over there, the vehicle still goes to the place we set it at, even after I don't need it there anymore...
I just need it to work until the player gets to the vehicle, then I don't need it to ever work again, ya know?
This is starting to be more complicated than I thought... _________________ ---------------Projects----
Mr.Triangle's Maze: 70%
Takoyaki Surprise: 70% |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Nov 24, 2007 4:51 pm Post subject: |
|
|
It seems that maybe you over simplified waht you want, but couldn't you just turn off tag 87 when you use the vehicle? _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
RedMaverickZero Three pointed, red disaster! Halloween 2006 Creativity Winner


Joined: 12 Jul 2003 Posts: 1459
|
Posted: Sat Nov 24, 2007 7:49 pm Post subject: |
|
|
*Phew*
Yeah, your script saved me, and then I thought to use a special tag just for this situation, and it all worked beautifully! Thanks a ton Cacti! _________________ ---------------Projects----
Mr.Triangle's Maze: 70%
Takoyaki Surprise: 70% |
|
Back to top |
|
 |
|