Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   setlevel2 help (https://forums.graalonline.com/forums/showthread.php?t=61751)

prozac424242 10-15-2005 05:50 PM

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!

prozac424242 10-15-2005 08:51 PM

zelph - it didnt work

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

Lance 10-15-2005 09:29 PM

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.

prozac424242 10-16-2005 05:38 AM

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 ..

Maniaman 10-16-2005 04:10 PM

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.

Lance 10-16-2005 07:17 PM

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.

prozac424242 10-17-2005 02:38 AM

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 ...

Lance 10-17-2005 03:14 AM

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.

Knuckles 10-17-2005 03:45 AM

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.

ZeLpH_MyStiK 10-17-2005 06:03 AM

x.x cool it guys, let's not get into this please.


All times are GMT +2. The time now is 10:56 AM.

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