![]() |
Problem with scripting
How does onwall, strings, variables, onwall2, tokenize, and loops work?
Im confused deeply on these things I want to learn how to make loops and make npcs chase players atleast |
i will tell on ICQ...
|
Okay I think I got the drift
Ok lets say I can command a object.... and I want to make it hide would this be correct script? if (playerenters && #a(Captain-USA)) {setstring #a (Captain-USA) if (playerchats && #a(Captain-USA)) {#c, Hide NPC; setstring Hide NPC;} if (strequals t#(Hide NPC)) {hide;sleep 5;show} Now if I want it to unhide would it be.... if (playerenters && #a(Captain-USA)) {setstring #a (Captain-USA) if (playerchats && #a(Captain-USA)) {#c, Hide NPC; setstring Hide NPC; #c Unhide NPC; setstring Unhide NPC} if (strequals #t(Hide NPC) || #t(Unhide NPC)) {#c,Hide NPC;hide || #c,Unhide NPC; show} |
Wait is this it?
// NPC made by Captain USA if (playerenters && #a,Captain-USA) {setstring #a,Captain-USA} if (playerchats && #a,Captain-USA && #c,HideNPC) {setstring Hide NPC,1;} if (playerchats && #a,Captain-USA && #c,UnhideNPC) {setstring Unhide NPC,2;} if (strequals,#t1) {hide;} if (strequals,#t2) {show;} |
*AlphaFlame*
Err... kinda... // NPC made by Captain USA if (playerchats && strequals(#a,Captain-USA) && strequals(#c,HideNPC)) {hide;} if (playerchats && strequals(#a,Captain-USA) && strequals(#c,UnhideNPC)) {show;} Didn't need the first line or the last two :P |
Quote:
NPC Code: |
Quote:
it just makes the code cleaner. |
Quote:
|
-Posted by Jadis
And I prefer no |
Quote:
|
| All times are GMT +2. The time now is 08:49 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.