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 01-30-2002, 07:05 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Stuck

I need help with this it wont go up.

showimg index,@Font@@Taged: #v(this.tag),x,y;
changeimgcolors index,1,1,1,1.99;
changeimgzoom index,1;

to touch to go up:

if (playerenters) {
timeout = 0.1;
}
if (playertouchsme) {
time.tag+=1;
}
while (timeout) {
x = random(24,41);
y = random(7,14);
sleep 0.1;
}
Reply With Quote
  #2  
Old 01-30-2002, 07:57 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Stuck

Quote:
Originally posted by Poogle
I need help with this it wont go up.

showimg index,@Font@@Taged: #v(this.tag),x,y;
changeimgcolors index,1,1,1,1.99;
changeimgzoom index,1;

to touch to go up:

if (playerenters) {
timeout = 0.1;
}
if (playertouchsme) {
time.tag+=1;
}
while (timeout) {
x = random(24,41);
y = random(7,14);
sleep 0.1;
}
A few things:
time.tag+=1;
should be this.tag since the showimg is read as this.tag)
secondly dont do while timeout
if (created) {timeout=.05;}
if (timeout) {timeout=.05;}
works fine
Third:
x = random(24,41);
that could make a number like 24.4322343545234072307
do
x= int(random(24,41));
that gets rid of the following decimals
Reply With Quote
  #3  
Old 01-30-2002, 08:11 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
It will have to be while or it wont jump around and it still doesnt go up..
Reply With Quote
  #4  
Old 01-30-2002, 08:20 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
hmm, try removing the #v()
Reply With Quote
  #5  
Old 01-30-2002, 08:21 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
Re: Re: Stuck

Quote:
Originally posted by Python523

A few things:
time.tag+=1;
should be this.tag since the showimg is read as this.tag)
secondly dont do while timeout
if (created) {timeout=.05;}
if (timeout) {timeout=.05;}
works fine
Third:
x = random(24,41);
that could make a number like 24.4322343545234072307
do
x= int(random(24,41));
that gets rid of the following decimals
what's wrong with an x,y coordinate being decimal?
Reply With Quote
  #6  
Old 01-30-2002, 08:26 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Re: Re: Stuck

Quote:
Originally posted by Faheria_GP2


what's wrong with an x,y coordinate being decimal?
I made a soccer ball like that once and it got really messed up, its just better to have it just 1 or 2 numbers instead of graal having to read 10 digits like 34.7579245
Reply With Quote
  #7  
Old 01-30-2002, 08:57 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Quote:
Originally posted by Python523
hmm, try removing the #v()
doesnt do anything
Reply With Quote
  #8  
Old 01-30-2002, 09:06 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
this works perfectly:
if (created||timeout)
{
show();}
function show();
{showimg 1,@Font@Taged:#v(this.tag),x,y;
timeout=.1;
}
if (playerenters) {
timeout = 0.1;
}
if (playertouchsme) {
this.tag+=1;
}
while (timeout) {
x = random(24,41);
y = random(7,14);
sleep 0.1;
}
Reply With Quote
  #9  
Old 01-30-2002, 10:10 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
now this wont show the score at the end and change it to 0if (playerchats&&strequals(#c,start)) {
playerx=31;
playery=12;
set tagstart;
}
while (tagstart) {
sleep 60;
say2 Your score is:#b #v(this.tag);
playerx=31;
playery=15;
this.tag=0;
unset tagstart;
}
Reply With Quote
  #10  
Old 01-30-2002, 10:14 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Poogle
now this wont show the score at the end and change it to 0if (playerchats&&strequals(#c,start)) {
playerx=31;
playery=12;
set tagstart;
}
while (tagstart) {
sleep 60;
say2 Your score is:#b #v(this.tag);
playerx=31;
playery=15;
this.tag=0;
unset tagstart;
}
if (playerchats&&strequals(#c,start)) {
playerx=31;
playery=12;
set tagstart;
}
while (tagstart) {
sleep 2;
say2 Your score is:#b #v(this.tag);
playerx=31;
playery=15;
sleep.01;
this.tag=0;
unset tagstart;
}
Reply With Quote
  #11  
Old 01-30-2002, 10:28 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
evil laugh inserted here
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #12  
Old 01-30-2002, 07:47 PM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Quote:
Originally posted by Kaimetsu
Don't use a while loop with sleeps, use a normal timeout loop. Converting your code (which seems strange beyond belief), we get this:

if (playerenters) {
timeout = 0.1;
}
if (playertouchsme) {
time.tag+=1;
}
if(timeout) {
x = random(24,41);
y = random(7,14);
timeout=0.1;
}
yeAH but i need help on the lastest thing i posted
Reply With Quote
  #13  
Old 01-30-2002, 08:19 PM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
kai's right

you shouldn't use a while loop with timeout, its just nasty
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #14  
Old 01-31-2002, 12:10 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Re: Stuck

showimg index,@Font@@Taged: #v(this.tag),x,y;
changeimgcolors index,1,1,1,1.99;
changeimgzoom index,1;
^-- WTF is that about?
i think that it looks good the way kaimetsu wrote it...maybe pastaustin is wrong? i don't see any reason it wouldn't work tho. . If your doing showimg, use this.x and this.y, that way the npc isn't moving all around...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #15  
Old 01-31-2002, 08:10 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Lol...come back here.... (sorry...such a worthless post, but it amused me...)
Attached Thumbnails
Click image for larger version

Name:	lol.png
Views:	167
Size:	34.8 KB
ID:	11277  
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 06:52 PM.


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