![]() |
Is the script parsing feature allowed on non-P2P servers?
|
par.....se...eeengg??
|
Should be where you can pick out a string from a line and use it for whatever reason. You could make new "server commands" with it. :)
|
Actually...
You can do that with it ;)
Let's see now this would be a script which should work for warpto simulation: NPC Code: Just try it, you can then use warpto offline ;) |
heh, that is cool. I could use that for my personel world I am making. Very good and cool.
|
Grr
Damn it, I already know how to parse strings, I'm just asking if it's alright to use in a non-p2p server.
Besides, if you're gonna warp x/y, you don't have to use tokenize2... watch: NPC Code: Anyway, all I want to know is if it's alright with Stefan to use it on a non-P2P world. |
Oh yeah, I don't think strings can serve as real variables, but if they can, here's shorter warpto code:
NPC Code: |
Blah.
I used the tokenize2 to allow true warpto stuff, because if you have that power you say:
Quote:
And as for the other thing we'll just have to wait till Stefan replies ^^ |
Yeah, I had just caught that you used strtofloat after I posted it, and decided not to edit my post. I don't know why.
|
Heh, I made a mistake myself with the playerx and playery anyway ^^
|
Well
Yeah.
For some reason, I usually experiment with new commands as soon as I know about them :P Just to figure out how they'd be useful to me. :) |
Heh...I keep asking him what we're allowed to and not allowed to use on Classic, but he won't tell me...I'm not entirely sure we're included in the PW category, since we're sorta the G2K1 Demo Version...
|
Another way
Here is another way you could make a warpto function:
if (playerchats&&startswith(warpto ,#c)) { players[0].x=strtofloat(#e(7,2,#c)); players[0].y=strtofloat(#e(10,-1,#c)) } That is a little shorter than using tokenize but not sure if it is the best way to do it. --------------- bryan986 Navarone PW Owner |
shouldn't this go in the Levels and NPC forum?
|
Stefan won't notice it there.
Besides, this topic wasn't intended for script discussion for warpto and such, but someone had to bring it up. :P |
| All times are GMT +2. The time now is 04:23 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.