[project1dev] Re: Project1 - SVN Update 65

  • From: Kent Petersen <kentkmp@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Thu, 30 Apr 2009 15:01:51 -0700

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: