![]() |
Trees.
I am a decent scripter but I have a question and I hope you guys will point me in the right direction.I made a tree script and such but I find it isn't that effiencent.I was wondering if you peoples can tell me commands (not the script!!) to make my tree script more effiencent.It would help me A LOT!
Contact me on AIM or on classic.I might be on g2k1 for a couple hours. |
What is your tree script supposed to do?
|
reply
I guess I should have indicated that.Well I basically want what the p2p servers have with the tree growing/ apple getting.I have/had a tree but I used putnpc.I know you can use setarray but I don't know how to use it.This is some of the things I need to know about.Saving the tree steps is another thing.And doing it with a low amount of strings would be good.(like 5-10 strings max).Please point me in the right direction.
|
Re: reply
Quote:
Arrays are like having a string with more than one string in it, let's start out by setting the array: setarray myarray,2; it will set the array and will allow you to set three different parts (0, 1, and 2) to read the arrays, you do this: if (myarray[0]=0) if (myarray[1]=0) if (myarray[2]=0) if (myarray[0]=1) ext... to set part of an array to a value, you do this: if (created) {myarray[0]=1;} and you can do a lot of other things with arrays, hope you understand now |
thanks
Thanks for helping me with setarray.I was wondering how to use those for awhile.Now I gotta make some sorta NPC with it to fully understand it.:cool:
Thanks. |
Re: thanks
Quote:
Make a 'mimic' that will look in the direction you do, it was the first thing I did using arrays |
ok.
1 Attachment(s)
I will try to make it but I proably will make a mess of it.I used:
if (playerdir=2) { dir=4; say whatever; } But that is repetitive.This way I hope is easier and less repetitive. And if you notive my pic I included.That is from a crafting place I made and the bomy script that I also made.(it doesn't have every little thing in it from g2k1 bomy script but it has almost everything.) |
Re: ok.
Quote:
remember, = is an assignment, == means equals |
sorry
that was just a spelling mistake.I would have picked that up if I was looking at the editor.
so let me get this straight. If I make an NPC that you touch it will activate the setarray command? Example: if (playertouchsme) { setarray testarray,2; } If thats proper I have a few other questions.Can you use client.variables or server.variables in the script? And where you pu the # does that set the limit of how many arrays I use?Like if I make it higher can I make more arrays?Same thing with lower? I just like trying to figure as much as I can about these things.:rolleyes: |
All times are GMT +2. The time now is 06:39 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.