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 08-05-2006, 07:51 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Talking showpoly?

I can't figure out what's wrong with this. Graal bible says the syntax is correct, I haven't found anything searching here. Please help
PHP Code:
//#CLIENTSIDE
function onCreated() {
setTimer(0.05);
}
function 
onTimeOut() {
temp.array = {player.x,player.y,mousex,mousey};
showpoly(200,temp.array);
changeimgvis(200,1);
setTimer(0.05);

Thanks
__________________
Reply With Quote
  #2  
Old 08-05-2006, 09:08 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Im not sure of the problem either, but, try either of these two.


PHP Code:
//#CLIENTSIDE
function onCreated() {
setTimer(0.05);
}
function 
onTimeOut() {
temp.polyarray = {player.x,player.y,mousex,mousey};
showpoly(200,temp.polyarray);
changeimgvis(200,1);
setTimer(0.05);


Or..


PHP Code:
//#CLIENTSIDE
function onCreated() {
setTimer(0.05);
}
function 
onTimeOut() {
temp.polyarray = {{player.x,player.y,mousex,mousey}};
showpoly(200,temp.polyarray[0]);
changeimgvis(200,1);
setTimer(0.05);


Meh, dunno.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #3  
Old 08-05-2006, 10:00 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I changed it to
PHP Code:
function onActionServerSide() {
if (
params[0] == "test") {
echo(
params);
}
}
//#CLIENTSIDE
function onCreated() {
setTimer(0.05);
}
function 
onTimeOut() {
temp.polyarray = {{player.x,player.y,mousex,mousey}};
triggeraction(0,0,"serverside",name,"test",temp.polyarray[0]);
showpoly(200,temp.polyarray[0]);
changeimgvis(200,1);
setTimer(2);

Which returned in RC:

PHP Code:
test,"21.5,31,22.1875,54.0625" 
Help please?
It looks like the problem is the showpoly.
It's not serverside, is it? Maybe its a problem with V4.1?
But then how does GK do it?
__________________
Reply With Quote
  #4  
Old 08-06-2006, 01:50 AM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
You need 8 parts for showpoly (9 including img id).

PHP Code:
showpoly(4000,{0,0,screenwidth,0,screenwidth,screenheight,0,screenheight}); 
Takes up the whole screen. You need to give an x and y for each seperate corner (top left, top right, bottom left, bottom right).

I think it's something like, if the screen is like this

x1y1...............................x2y2
...........................................
x4y4...............................x3y3


showpoly(ID,{x1,y1,x2,y2,x3,y3,x4,y4});
__________________




Last edited by Omini; 08-06-2006 at 01:52 AM.. Reason: Spreading out the x#y#
Reply With Quote
  #5  
Old 08-07-2006, 01:07 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Omini
You need 8 parts for showpoly (9 including img id).
Don't be silly.

There's no area to fill, so, no poly (a line has no area).


PHP Code:
temp.array = {player.x,player.y,mousex,mousey,mousex,mousey+1/16}; 
fixes the problem.
Reply With Quote
  #6  
Old 08-07-2006, 02:30 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Probably repeating what someone else said.

Polys with an area of 0 won't show, which makes the showing of lines impossible.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #7  
Old 08-07-2006, 09:57 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Quote:
Originally Posted by Tolnaftate2004
Don't be silly.

There's no area to fill, so, no poly (a line has no area).


PHP Code:
temp.array = {player.x,player.y,mousex,mousey,mousex,mousey+1/16}; 
fixes the problem.
But he's using showpoly... unless there are 2 methods of using it.
__________________



Reply With Quote
  #8  
Old 08-07-2006, 10:23 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Omini
But he's using showpoly... unless there are 2 methods of using it.
It doesn't always have to be a quadrilateral, though. A polygon can have 3+ sides.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #9  
Old 08-07-2006, 10:33 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Oh yeah. I just got used to using poly as a 4 point thing. Silly me.
__________________



Reply With Quote
  #10  
Old 08-08-2006, 12:22 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
i know a 1 sided polygon :O
__________________
Deep into the Darkness peering...
Reply With Quote
  #11  
Old 08-11-2006, 04:36 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
Yes, Stefan changed the showpoly code (again).
This happened before in v3, and it was fixed on the next release.
Hopefully he reverts the code again, but for now, no 0-volume polies.
In order to make lines, make a box out of the two points, but at +1/8 to the second set. That should solve your problem.
__________________
Reply With Quote
  #12  
Old 08-11-2006, 05:29 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by Angel_Light
i know a 1 sided polygon :O
wow...polygon -.-
__________________
Reply With Quote
  #13  
Old 08-11-2006, 10:50 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by ZeLpH_MyStiK
wow...polygon -.-
XD I know but I can make it. Maybe it shoiuld be called a unigon?
__________________
Deep into the Darkness peering...
Reply With Quote
  #14  
Old 08-11-2006, 10:57 PM
smirt362 smirt362 is offline
Tee Hee
smirt362's Avatar
Join Date: Feb 2005
Location: Texas
Posts: 2,101
smirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant future
Send a message via AIM to smirt362 Send a message via MSN to smirt362
It should be called a LINE.
__________________

Don Hertzfeldt <3
Reply With Quote
  #15  
Old 08-12-2006, 12:50 AM
gamer4lifebitach gamer4lifebitach is offline
Scripter
gamer4lifebitach's Avatar
Join Date: Oct 2005
Location: Illionis, USA
Posts: 25
gamer4lifebitach is on a distinguished road
Send a message via AIM to gamer4lifebitach Send a message via MSN to gamer4lifebitach
hmm ya, if you need help with it you can pm me.
__________________

~Contact Information~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
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 12:22 AM.


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