Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-01-2004, 05:36 AM
Blue_Dragn Blue_Dragn is offline
Registered User
Join Date: Jul 2003
Posts: 302
Blue_Dragn is on a distinguished road
Re: Summon Script in a level npc stupid problem

Quote:
Originally posted by Gman4pwnu
I was making a level summon script, it works, but it summon the player to 0 x and 0 y in the level =\
help.

NPC Code:

if (actionplayertouch){
with (getplayer(#p(0))){
setcharprop #c,#p(0);
this.xx=strtofloat(#p(1));
this.yy=strtofloat(#p(2));
setplayerprop #c,Being Summoned;
setlevel2 #p(3),this.xx,this.yy;
}
}

//#CLIENTSIDE

if (playerchats&&strcontains(#c,/summon)){
tokenize #c;
setplayerprop #c,#v(playerx),#v(playery),#L;
triggeraction x+.5,y+.5,playertouch,#t(1),playerx,playery,#L;
}

if im thinking right playerx and playery are already defined and dont need strtofloat?

else try just defining strtofloat and the params in the setlevel, rather then setting another variable.

Tired right now, hope it helps
__________________
No longer a Advertisement Goat
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:02 AM.


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