View previous topic :: View next topic |
Author |
Message |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue May 25, 2004 6:56 am Post subject: Finding Heroes and NPCs on Maps, NPC Overlay, etc. |
|
|
A few quick questions.
1. Is it possible to "find" a hero's x/y coordinants on a map with a plotscriptnig command? (ie: find hero location or something). Sew mentioned a command like this at one point, but I don't know if it is in a custom plotscripting dictionary or something. I REALLY need to know about this, so if you have any idea how to pull it off please tip me off.
2. Same thing as above, except with NPCs instead of heroes (ie, find npc location (1, x) or something).
3. Is there a way to force an npc to walk on top of another npc? That is, is there a "suspend npc collisions" command or whatnot so that if I moved an npc to the left one and it stepped on another npc it would just keep on walking? I noticed in Stop that the npcs ran into the NPCs that triggered the shadows (which made it a pain to plotscript ), and I was wondering if there was any way to turn this off.
Thank you in advanced.
Add on:
If the npc thing isn't possible, it would also work if there was a "walk npc to (x,y)" in terms of coords (note: they'd HAVE TO WALK. NOT TELEPORT). To give a general idea of what this is, the hero is a curser, and the npc will walk to where the curser is pointing. So, how I figured it would work is, I'd take the hero's x/y coords, and then walk the npc to those x/y coords. If it didn't work I coudl write an easy little thing that would just subtract the x/y and have a "walk npc" type thingy for the subtracted amount.
Hope that helps in answering my question. _________________ But enough talk, have at you! |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Tue May 25, 2004 7:34 am Post subject: |
|
|
1. herox(who) and heroy(who)
2. npcx(who) and npcy(who)
or something in that nature(i am in college so I cannot make sure its correct, but it is.
herox will return your horizontal position
heroy will return your vertical position
same goes for npc _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
rpgspotKahn Lets see...

Joined: 16 May 2004 Posts: 720 Location: South Africa
|
Posted: Tue May 25, 2004 7:38 am Post subject: |
|
|
Yes you can find a hero's position on the map. I had to do it in Winterfold.
http://www.castleparadox.com/forum/download.php?game=415
You can also make NPC's walk around... but I dont think on top of each other.
If its a menu or something you are trying to make I can give you the plotscripts to Winterfold and It will show you how I made the menu in my game... Im not too sure what your looking for though...  _________________
2nd Edition out now! |
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue May 25, 2004 8:41 am Post subject: |
|
|
Y-soft : I love you. <3
Still need an answer to #3, though.  _________________ But enough talk, have at you! |
|
Back to top |
|
 |
Machu Righter, a person who rights wrongs

Joined: 09 Jul 2003 Posts: 737
|
Posted: Tue May 25, 2004 9:19 am Post subject: |
|
|
From what I know, "suspend obstruction" lets NPCs walk through each other.
I believe there are also "walk NPC to X (who,X)" and "walk NPC to Y (who,Y)". I personally haven't tried those two, but I assume that saying those together before a wait command would make it walk diagonally until it's aligned, then it'd walk straight there. I think Walthros's Inn script did something like that, though the Inn's design sometimes made them walk through furniture. Oh well, it's up to you to implement.
Also, it wouldn't hurt to read through this, or have it saved somewhere. _________________
Code: | [*]That's it
[*]I'm done reasoning with you
[*]Starting now, there's going to be a lot less conversation and a lot more killing |
|
|
Back to top |
|
 |
Retrogamer Trailblazer

Joined: 17 Mar 2003 Posts: 30 Location: Canada
|
Posted: Tue May 25, 2004 9:24 am Post subject: Well... |
|
|
#3: "suspend obstruction" command.
The only concern is that it ALSO allows heroes to walk through NPCs (and vice versa) as well.
Is that going to be a problem?
Edit: My timing sucks.
~Retro |
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue May 25, 2004 10:17 am Post subject: |
|
|
Actually, that's even better. Just to make sure, though, if there is a "step on" npc and suspend obstructions is off...will it still be triggered? _________________ But enough talk, have at you! |
|
Back to top |
|
 |
Retrogamer Trailblazer

Joined: 17 Mar 2003 Posts: 30 Location: Canada
|
Posted: Tue May 25, 2004 10:50 am Post subject: |
|
|
"Step on" NPCs will react accordingly when suspend obstruction is off...
That would be the default.
Did you mean to say "suspend obstruction is on"? Heh.
I'm not certain if "step on" NPCs work under the suspend obstruction command (they probably don't...).
"Touch" NPCs work fine, however.
Hmm... that's something I should test.
~Retro |
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue May 25, 2004 10:56 am Post subject: |
|
|
Uh, yeah, I ment "on." Geez, I am totally brain dead today.
But, yeah. If it doesn't work...that will totally suck. :'( _________________ But enough talk, have at you! |
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue May 25, 2004 11:36 am Post subject: |
|
|
ANOTHER QUESTION.
(I should make a big fat "Shadowiii don't know his plotscripting commands" thread )
CAN YOU STOP AN NPC. That is, you ordered an npc to walk. However, halfway in his walkingness, something comes up (he left the burner on! oh noes!) and you need to STOP NPC (2). This doesn't come up as a command in the plotscripting dictionary, though I'm sure there is a trick to doing it. And, no, doing "Suspend NPC" "Resume NPC" really fast doesn't stop ones you commanded to "Walk npc (2, 7, left)" or whatever.
And Machu, I do have that as a constant reference, as I use the HSS editor. _________________ But enough talk, have at you! |
|
Back to top |
|
 |
Iblis Ghost Cat

Joined: 26 May 2003 Posts: 1233 Location: Your brain
|
Posted: Tue May 25, 2004 11:58 am Post subject: |
|
|
Quote: | CAN YOU STOP AN NPC. That is, you ordered an npc to walk. However, halfway in his walkingness, something comes up (he left the burner on! oh noes!) and you need to STOP NPC (2). |
You could probably use Alter NPC to change its move type to "stand still," and then the same command to change it back later if you need to. |
|
Back to top |
|
 |
Machu Righter, a person who rights wrongs

Joined: 09 Jul 2003 Posts: 737
|
Posted: Tue May 25, 2004 12:10 pm Post subject: |
|
|
Hmm, stoping an NPC... maybe you can quickly read it's current X and Y to some variables, then move it to the spot it's standing on, thus nowhere?
EDIT OFF-TOPIC: At the time of this posting, Shadow Eyes's post count is 1337. You know what that means in leet-speak, don't cha? _________________
Code: | [*]That's it
[*]I'm done reasoning with you
[*]Starting now, there's going to be a lot less conversation and a lot more killing |
|
|
Back to top |
|
 |
Retrogamer Trailblazer

Joined: 17 Mar 2003 Posts: 30 Location: Canada
|
Posted: Tue May 25, 2004 1:04 pm Post subject: Nobody reads these, anyway! |
|
|
Shadow, just input the command "walk NPC (#, NPC direction (#), 0)".
That should work. |
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue May 25, 2004 2:56 pm Post subject: |
|
|
I AM NOW 1337 + 1 YAY SO AWSUM.
By the way, none of your ideas are working (yes, I actually tried them all). WHY OH WHY. I think I'll post this up on the help-me board, James is more frequent there.
If anyone has any other ideas, PLEASE tell me. _________________ But enough talk, have at you! |
|
Back to top |
|
 |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Tue May 25, 2004 3:08 pm Post subject: |
|
|
for stopping an NPC...
you can use Iblis's alternpc idea, but set its speed to 0 instead.
you can use writepassblock(npcx(#)MATHSTUFF,npcy(#)MATHSTUFF,etc) The problem with this is the npc may like turn around or something.
you could always use walknpctox(2,CURSORSTUFF) and such.. but i don't get the whole script's idea, heh. |
|
Back to top |
|
 |
|