[project1dev] Re: Project1 - SVN Update 65

  • From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Thu, 30 Apr 2009 15:23:39 -0700

even those just to be safe

what if someone is doing a loop and calling move multiple times or
something.  Who knows why but it might happen you never know
On Thu, Apr 30, 2009 at 3:22 PM, Kent Petersen <kentkmp@xxxxxxxxx> wrote:

> what about placeholder variables like i and n
>
>
> On Thu, Apr 30, 2009 at 3:20 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:
>
>> best way is by hand unfortunately, but if for instance all variables are
>> getting a __MOVEMENT__ in front just copy/paste that text in front of every
>> var name.  best way i've found.
>>
>> using replace all might convert the wrong things etc so isnt safe ;P
>>
>> On Thu, Apr 30, 2009 at 3:03 PM, Kent Petersen <kentkmp@xxxxxxxxx> wrote:
>>
>>> is there a good way to rename all the variables?
>>>
>>>
>>> On Thu, Apr 30, 2009 at 3:01 PM, Kent Petersen <kentkmp@xxxxxxxxx>wrote:
>>>
>>>> oh gotcha yeah. i have almost got in all the changes were talking about.
>>>>
>>>>
>>>>
>>>> On Thu, Apr 30, 2009 at 2:54 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx>wrote:
>>>>
>>>>> oh and the variables that the movement script uses, i'd put some prefix
>>>>> on them that isn't likely to get used by other scripts
>>>>>
>>>>> like instead of a var called "NextIndex" make it be
>>>>> "__MOVEMENT__NextIndex"
>>>>>
>>>>> that will make it so if someones scripting an enemy, that they wont
>>>>> accidentally make a NextIndex variable and try to use it and get really
>>>>> weird results and not know why :P
>>>>>
>>>>>   On Thu, Apr 30, 2009 at 2:19 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx>wrote:
>>>>>
>>>>>> oh, about you saying you dont know how to init the vars, try putting
>>>>>> them into the movement.lua file, but not inside any function, just at the
>>>>>> top.
>>>>>>
>>>>>> I think that should work
>>>>>>
>>>>>>   On Thu, Apr 30, 2009 at 2:14 PM, Alan Wolfe 
>>>>>> <alan.wolfe@xxxxxxxxx>wrote:
>>>>>>
>>>>>>> if the movement_getmessage recognizes the command it returns true,
>>>>>>> otherwise it returns false.  That will be useful later on (:
>>>>>>>
>>>>>>> if you can figure out how to get the vars inside the movement script
>>>>>>> that'd be really clean, you want the movement script to be as self 
>>>>>>> contained
>>>>>>> as possible.  If you can't get that part let me know and i can give it a
>>>>>>> shot
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Apr 30, 2009 at 2:05 PM, Kent Petersen <kentkmp@xxxxxxxxx>wrote:
>>>>>>>
>>>>>>>> when i was trying to move the variables around i kept breaking it.
>>>>>>>> not sure how to initlize the variables on the movement.lua side. the 
>>>>>>>> other 2
>>>>>>>> make good sense. i can probly do that
>>>>>>>>
>>>>>>>> not sure what you mean by return true or false
>>>>>>>>
>>>>>>>>  On Thu, Apr 30, 2009 at 1:59 PM, Alan Wolfe 
>>>>>>>> <alan.wolfe@xxxxxxxxx>wrote:
>>>>>>>>
>>>>>>>>> Hey it looks pretty good (:
>>>>>>>>>
>>>>>>>>> A couple things though:
>>>>>>>>>
>>>>>>>>> #1 - i'd change the GetMessage function in movement.lua to be named
>>>>>>>>> something else such as Movement_GetMessage and then make a GetMessage
>>>>>>>>> function in your miner that in turn calls Movement_GetMessage.  This 
>>>>>>>>> is so
>>>>>>>>> you can still send messages (of other types) to the miner if you 
>>>>>>>>> wanted to
>>>>>>>>> that don't relate to movement.  More importantly, this is so that 
>>>>>>>>> other
>>>>>>>>> people can make other monsters which can still receive messages that 
>>>>>>>>> dont
>>>>>>>>> relate to movement.
>>>>>>>>>
>>>>>>>>> #2 - i'd put all the movement variables and arrays into the
>>>>>>>>> movement.lua file so that the enemy that used the movement didn't 
>>>>>>>>> have to
>>>>>>>>> declare those vars (and it would break if someone forgets)
>>>>>>>>>
>>>>>>>>> #3 - you can delete the commented out functions in newminer to
>>>>>>>>> maake it cleaner if you want.  SVN keeps every version of every file 
>>>>>>>>> checked
>>>>>>>>> in so we can always go back if we need to.  No reason to keep 
>>>>>>>>> commented code
>>>>>>>>> around that you know you probably won't need again (:
>>>>>>>>>   On Thu, Apr 30, 2009 at 1:52 PM, Apache User <
>>>>>>>>> dhapache@xxxxxxxxxxxxxxxxxxx> wrote:
>>>>>>>>>
>>>>>>>>>> User:korgath
>>>>>>>>>>
>>>>>>>>>> Message: modified newminer to seperate out movement into its own
>>>>>>>>>> file. new enemies should now be able use the movement file.
>>>>>>>>>>
>>>>>>>>>> alan: check it out and let me know if you think i did it well
>>>>>>>>>>
>>>>>>>>>> <Files Changed>
>>>>>>>>>> U   Scripts/Enemies/newminer.lua
>>>>>>>>>> U   Scripts/cavemap.lua
>>>>>>>>>> U   Scripts/movement.lua
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Other related posts: