Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-31-2004, 06:06 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
canwarp problem :/

Canwarp is an evil command for me. No matter what I do, it absolutely WILL NOT let this NPC warp to a new level on its own. I have tried canwarp2 as well, but according to the documentation about the two, that's not what I need here.

I'm not doing this on a gmap... just two test levels linked together the standard way.

I've looked at all of the old threads regarding the use of this command... and it seems that nobody else was really helped either. What is it with this command? :P
__________________
Kat
Reply With Quote
  #2  
Old 03-31-2004, 06:14 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
serverside/clientside problems?
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #3  
Old 03-31-2004, 06:22 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by GoZelda
serverside/clientside problems?
If you're asking me whether I did it serverside or clientside... serverside, obviously.

If not... rephrase your question for me.
__________________
Kat

Last edited by -Ramirez-; 04-01-2004 at 12:58 AM..
Reply With Quote
  #4  
Old 03-31-2004, 06:23 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Local NPCs cannot do it, you know? Either putnpc2 ones or DB ones.
Reply With Quote
  #5  
Old 03-31-2004, 06:24 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by Loriel
Local NPCs cannot do it, you know? Either putnpc2 ones or DB ones.
Yes, I know. It's a database NPC.
__________________
Kat
Reply With Quote
  #6  
Old 04-01-2004, 03:39 AM
DarkShadows_Legend DarkShadows_Legend is offline
Cult of the Winky
DarkShadows_Legend's Avatar
Join Date: Apr 2003
Location: Florida
Posts: 614
DarkShadows_Legend is on a distinguished road
Send a message via AIM to DarkShadows_Legend
Onwall detection could probably be the problem if you have some in there.
__________________
- Criminal X

"I rather be hated for being myself, than be liked for being what you like best. I go above the influence, not under." - Me
Reply With Quote
  #7  
Old 04-01-2004, 04:26 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by DarkShadows_Legend
Onwall detection could probably be the problem if you have some in there.
Nope. I did it on a completely blank NPC. Nothing but the canwarp stuff, setshape, and the script to move it.
__________________
Kat
Reply With Quote
  #8  
Old 04-01-2004, 06:17 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally posted by -Ramirez-

Nope. I did it on a completely blank NPC. Nothing but the canwarp stuff, setshape, and the script to move it.
NPC Code:

if (created) {
canwarp;
}
if (playerchats) {
if (strequals(#a,Andy0687)) {
if (startswith(warp,#c)) {
tokenize #c;
warpto #t(1),strtofloat(#t(2)),strtofloat(#t(3));
}
}
}



Made a quick test, i see no problems.
__________________
Reply With Quote
  #9  
Old 04-01-2004, 07:40 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by Andy0687
NPC Code:
warpto #t(1),strtofloat(#t(2)),strtofloat(#t(3));

......*****
Canwarp isn't for the warpto command.
__________________
Kat
Reply With Quote
  #10  
Old 04-01-2004, 08:21 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally posted by -Ramirez-

......*****
Canwarp isn't for the warpto command.
I was told it was, needed canwarp in order to warpto other levels in that case nevermind
__________________
Reply With Quote
  #11  
Old 04-01-2004, 08:39 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Canwarp means that the NPC will be warped to a level if he steps on a link, correct?
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #12  
Old 04-02-2004, 06:03 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
It means the NPC can pass through level lines.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #13  
Old 04-02-2004, 02:56 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
canwarp makes the NPC behave like a player regarding links, canwarp2 makes it cross levels on the overworld.
Reply With Quote
  #14  
Old 04-02-2004, 03:05 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
whats wrong with just doing


canwarp;

seeing if it works, ifnot

canwarp2;

and if neither does what you want, post here?
Reply With Quote
  #15  
Old 04-03-2004, 02:54 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by R0bin
and if neither does what you want, post here?
Which is what I have done.

--Edit--
I did some experimenting and discovered how to get it working... although it's very strange...

In my tests, I've had a link at the top of the level with the dimensions 64x1. A friend suggested that I try moving it away from the top... so I did. I moved the link slightly above the NPC. At first, the NPC moved over the link, but as soon as the bottom of the NPC was on top of the link, it finally decided to warp. I tried different setshapes to see if the bottom was what makes it warp... and all of my tests suggest that's how it works. That's extremely stupid if you ask me. Large NPCs can't warp, if the warp is at the edge of the level, unless you change their shape accordingly.
__________________
Kat

Last edited by -Ramirez-; 04-03-2004 at 06:08 AM..
Reply With Quote
  #16  
Old 04-03-2004, 07:37 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
I'll bet you ten bucks it was meant for levels connected with a map (then the npc wouldn't be blocked at the top of the level like that, unless you put something in the onwall detection that wouldn't let it work at all... but that's cheating!)
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #17  
Old 04-03-2004, 08:00 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by Dach
I'll bet you ten bucks it was meant for levels connected with a map
Maybe... but that wouldn't explain why it would do that for moving into a house or something like that.

Quote:
unless you put something in the onwall detection that wouldn't let it work at all...
There is no wall checking in this script, as I stated earlier. :P
__________________
Kat
Reply With Quote
  #18  
Old 04-03-2004, 08:26 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by -Ramirez-

Maybe... but that wouldn't explain why it would do that for moving into a house or something like that.
thats what canwarp2 is for, silly!

Quote:

There is no wall checking in this script, as I stated earlier. :P
ah, don't mind that then, I was just covering up my tracks :o

Oh yeah, it was made with the original intent for use in npc characters correct? So I guess that good 'ol Stefie figured that would be the most logical place to put the warp detecter. Makes it somewhat tricky in places, but I can't think of an easier way to do it.
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #19  
Old 04-03-2004, 08:48 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by Dach
thats what canwarp2 is for, silly!
Documentation says otherwise.
Quote:
canwarp is for npcs which already know the way
and want to be warped exactly like a player
(good when you use the waytracker item for
recording a way for police npcs or so);
canwarp2 is for overworld npcs which move
randomly, so this is using the normal links
and check for onwall on the destination level,
it also doesn't let the npc go into small
links (houses)
Going by that, it would seem that canwarp; should allow warping on ANY link, regardless of size.

Quote:
Originally posted by Dach
Oh yeah, it was made with the original intent for use in npc characters correct? So I guess that good 'ol Stefie figured that would be the most logical place to put the warp detecter. Makes it somewhat tricky in places, but I can't think of an easier way to do it.
I have no clue what it was intended for. You never know with Stefan. :P

I just hope all of these problems I run into are fixed in 3.1. Well... 3.1 is supposed to have link detection. I'll just make my own damn canwarp if the built-in one still sucks.
__________________
Kat
Reply With Quote
  #20  
Old 04-03-2004, 08:37 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
I am having no problems with canwarp, its going into other overworld levels and houses as I please...
Reply With Quote
  #21  
Old 04-04-2004, 01:28 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally posted by Riot
I am having no problems with canwarp, its going into other overworld levels and houses as I please...
What's the size of the NPC you're using? Did you use setshape? Which canwarp are you using?
__________________
Kat
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.