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 10-15-2005, 05:50 PM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
setlevel2 help

New question: I have tried for hours to get a very simple thing to work:
when you enter a level, your y is set to 0 and is increased through a timeout.
this part works fine.
What I can't get to work is when the playery is greater than 55 it warps the player to another level.

Since the timeout and playery manipulation is clientside,
and setlevel2 is serverside, I need a triggeraction, right?
I have tried to no avail:
-putting the whole script as a serverside event
-doing a triggeraction in the npc that is in the level on the npc's x and y, and above the clientside line in the npc, placing the actionserverside and setlevel commands
-leaving the triggeraction in the npc in the level but moving the action part into a weapon npc with a unique action name
-moving the entire script into the weapon npc and the level adds the weapon npc when you enter the level
-adding a warp box at the bottom of the level
-changing the addweapon npc to do onPlayerenters and onCreated to sleep 12 seconds then setlevels
-putting that same sleep 12 seconds and setlevel2 into the level in an npc

nothing works!!! the player goes from the top to the bottom of the level (y increases) but it will not warp the player - the triggeraction never gets to the serverside command regardless of where the setlevel2 command is.

please help!
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #2  
Old 10-15-2005, 08:51 PM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
zelph - it didnt work

knuckles - IT WORKED!!!! THANK YOU!!!!
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #3  
Old 10-15-2005, 09:29 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by prozac424242
zelph - it didnt work

knuckles - IT WORKED!!!! THANK YOU!!!!
A level NPC would probably be a more appropriate place to put such a script.

-

The rest of you guys need to totally stop violating rule 2.
Reply With Quote
  #4  
Old 10-16-2005, 05:38 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
Quote:
Originally Posted by Lance
A level NPC would probably be a more appropriate place to put such a script.
but the level npc did not work. not the one posted, or the one I already made which was basically the same as the one that was posted.

-
Quote:
Originally Posted by lance
The rest of you guys need to totally stop violating rule 2.
[/quote]
for the record I read the rule2 and I disagree with it to the extent that I have half a decade experience with graal and 15 prior years to that of computer programming. I know many languages, and sometimes i need to SEE what it looks like in graalscript, whatever the current version may be.

Also, why is there not a categorized browse feature for the wiki?
I did not see one, please point me there .. surely anyone in their right mind making a website of vast knowledge must have put in a linked table of contents ..
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #5  
Old 10-16-2005, 04:10 PM
Maniaman Maniaman is offline
Registered User
Join Date: Aug 2005
Posts: 326
Maniaman is on a distinguished road
Quote:
Originally Posted by wiki.graal.us Main Page
If you're new here, why not take a look at the master page listing or a random page to get you started?
It's linked right on the front page.

As for rule 2, I wold have to agree with it. Nobody is learning if you just give them a full script to copy and paste.
__________________

Current Maloria Event: (click to go to it)
Reply With Quote
  #6  
Old 10-16-2005, 07:17 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by prozac424242
for the record I read the rule2 and I disagree with it to the extent that I have half a decade experience with graal and 15 prior years to that of computer programming. I know many languages, and sometimes i need to SEE what it looks like in graalscript, whatever the current version may be.
You can SEE it when you put it together yourself following the wordy descriptions people will happily provide you with.
Reply With Quote
  #7  
Old 10-17-2005, 02:38 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
How about this helpful suggestion and I ask that you read it through:

The college education method that my professors used:
they treated pascal and C++ as programming languages, with knowledge that the best way for the student to learn was to give them working example.
They gave us printouts, and we typed in the sample code.
The professor explained it as the information going from the eyes to the brain and out the fingers. Even the separation of them writing code on the blackboard and the students tanscribing it to a notebook and then typing it into the computers in the lab led to effective learning of that language.

But the main issue of posting code to people who want to learn the seemingly ever-changing nature of graalscript, is that they can copy and paste without doing work.

So how about:
-requiring code to be posted in the code blocks
-having that code be fed through a postscript or other text to image program
-instead of posting code, an image of the text is posted,
requiring the user to retype the block of code.

It would make this scripting part of the forums a lot more user friendly
and a lot more helpful, and as people would be leanring from typing in examples (a method nationally known colleges use) then there may even be fewer repetitive questions for the experts to answer time and again.

Please consider this ...
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #8  
Old 10-17-2005, 03:14 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by prozac424242
How about this helpful suggestion and I ask that you read it through:

The college education method that my professors used:
they treated pascal and C++ as programming languages, with knowledge that the best way for the student to learn was to give them working example.
They gave us printouts, and we typed in the sample code.
The professor explained it as the information going from the eyes to the brain and out the fingers. Even the separation of them writing code on the blackboard and the students tanscribing it to a notebook and then typing it into the computers in the lab led to effective learning of that language.
Okay, I think you're having a bit of trouble distinguishing between "Other people doing your job/work/assignment/problem for you" and "Other people providing you with examples of code to illustrate some facet of the language." The former is unacceptable, be it here or in a classroom. The latter is just fine and is even encouraged here.

I sincerely hope that you aren't suggesting that if people provided computer science students with the code they are supposed to figure out how to put together, then it would help them learn.

Quote:
But the main issue of posting code to people who want to learn the seemingly ever-changing nature of graalscript, is that they can copy and paste without doing work.
It's not at all conducive to learning if one posts the solution to a problem without posting any explanation about why that is the solution. It's doing someone's work for them, which is just not approved of here. Even posting the solution with an explanation is sketchy because of the copy-and-paste factor - there's no guarantee that the person in question won't just copy-and-paste without reading the explanation. Wordy solutions are encouraged, but code that can just be copy-and-pasted is not allowed.

Quote:
So how about:
-requiring code to be posted in the code blocks
This is recommended, anyway.

Quote:
-having that code be fed through a postscript or other text to image program
-instead of posting code, an image of the text is posted,
requiring the user to retype the block of code.

It would make this scripting part of the forums a lot more user friendly
and a lot more helpful, and as people would be leanring from typing in examples (a method nationally known colleges use) then there may even be fewer repetitive questions for the experts to answer time and again.
Okay, once again I have to point out that a difference exists between "typing in examples" and "typing in the solution to whatever problem was posted about".

Also, forcing people to type posted solutions doesn't change the fact that the real work would still have been done for the person.

It is also recommended that one search the advice thread, forum, and wiki for the answer to their question before posting a thread. This cuts down on such repetitive questions.
Reply With Quote
  #9  
Old 10-17-2005, 03:45 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Lance, I learn from examples too.
Not everyones logic is as advanced as yours.
Seeing things in a logical way, seeing what they do, and how they're done helps a lot.

I'm not saying give a whole 900 line code to some kid who doesn't understand one bit of it... but this script was maybe 6 lines...and the coding explained itself. He just needed to see the order and how it worked.

It's not like he posted on here asking "Oh, can someone script me a user-system".
He was trying to do things for himself...

I understand not helping someone who asks for a whole script...but damn. It's 6 lines and we all knew he was trying to learn. You can tell who's trying to learn and who just wants the code. He posted at least 10 things that wouldn't work for him...

But I do agree about posting wordy setences to help someone understand more...but sometimes it's just easier to show them by example.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #10  
Old 10-17-2005, 06:03 AM
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
x.x cool it guys, let's not get into this please.
__________________
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 02:53 AM.


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