![]() |
[Help] Clearing a ton of arrays
Edit: Resolved
Right so, I'm having an issue. Each time a player touches an NPC specified for dialogue it loads a text file, first resets the variables, organizes it all, then displays it in the checkbox text. My only problem is that after i talk to one NPC and go up to another, it doesn't seem to reset, and if the new NPC has blank options where the first NPC actually had something written, it shows the data from the first npc's variables.... I only posted snippets for convenience (for you and me). PHP Code:
If anything is unclear or I left something out just ask for it. |
Wouldn't it be smoother to load all data upon creation rather then when touched?
|
It loads different files depending on which npc you go up to and touch.
I don't think on creation would work out so hot. Edit: When you touch an NPC it's joined to a class which in turn sends a triggerserver() to this weapon script which then loads the corresponding text file. |
Well, I'm having problems understanding your script due to the styling, it totally doesn't flow well with me... but that's a personal preference, but alas, it's not allowing me to be of much help.
I don't know, but couldn't you run a getStringKeys() loop on the NPC's this. variables and set them to blank? Should definitely clear them. |
Quote:
Odam I totally forgot about that. Thanks. |
| All times are GMT +2. The time now is 01:28 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.