06-23-2012
|
3 | |
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
-I get that alot -I'll try -making it once clicked, the attributes will load as the player's |
|
06-23-2012
|
6 |
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,824
|
PHP Code:
|
06-23-2012
|
7 |
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
PHP Code:
PHP Code:
PHP Code:
Yah no clue what I wrote there so ask me if you didnt understand something Damn Emera was faster but anyway it might help |
06-23-2012
|
9 | |
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
EDIT for John: To have it viewable for everyone you could simply change the client.statue_first to server.statue_first. That should work aswell and would be viewable for everyone. But probably I'd change it to something serverside than and use serverr.flags since they are more secure and not changeable with memory editors. |
|
06-23-2012
|
10 | |
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
Edit : oh nvm got it fixed! |
|
06-26-2012
|
11 |
Registered User
Join Date: Apr 2016
Location: Testbed
Posts: 604
|
If you save statue settings to serverr flags, Skyld will cleanse your server with flame. Server flags are not appropriate for statues at all... What if 1000 statues were added? >: ( If statues absolutely NEED to keep their outfit even when the level is updated/server is restarted, use files. e.g. this.statuename = "myhouse_statue1" and then when the outfit is set serverside, save all the variables into a file e.g. statues/myhouse_states1.txt In the oncreated event, check if the file exists and if it does, load the values from it. Keep it all serverside and then the server won't have to sync Statue outfits for statues in every single damn level with the player
Last edited by Twinny; 06-26-2012 at 05:28 AM.
Reason: Slight fix
|
06-26-2012
|
12 | |
Not Banned
Join Date: Sep 2011
Location: Hell
Posts: 4,885
|
|
|
06-26-2012
|
13 | ||
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
Since its a scripting thread, I need help with the variable commands, for example the ec system, I wanted to make it add on each time I want.
|
||
06-26-2012
|
14 | |
Registered User
Join Date: Apr 2016
Location: Testbed
Posts: 604
|
But, you should take it to the OGCC and not here at this point. |
|
06-30-2012
|
15 | |
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,824
|
PHP Code:
I doubt you'll be able to understand how to load/save from text files this early on in learning GS2, so here's an example of how to save and load your NPC's configuration to/from a text file. Firstly, you'll have to give your NPC-Server the following right. HTML Code:
rw objects/statues/*.txt PHP Code:
|
|