[Ohrrpgce] SVN: james/10193 Add a .by_user member to the HeroPathing object and use it to distinguis

Ralph Versteegen teeemcee at gmail.com
Mon Mar 26 17:40:59 PDT 2018


On 27 March 2018 at 13:26, James Paige <Bob at hamsterrepublic.com> wrote:

>
>
> On Monday, March 26, 2018, Ralph Versteegen <teeemcee at gmail.com> wrote:
>
>> I'm a bit concerned by:
>>
>> +   IF rank = 0 ANDALSO gam.hero_pathing(rank).by_user THEN
>> +    'Only the leader activates NPCs, and only when doing built-in user
>> pathing
>>
>> Other commands for scripted hero movement don't have any affect on
>> touch-NPC activation. And I assume pathing a touch-activated NPC past the
>> hero doesn't prevent its activation either. Why should hero pathfinding be
>> exceptional? If people don't want touch activation to occur, they could
>> explicitly suspend that activation instead*.
>> And anyway, you only disabled the touch-NPC-activation check in
>> update_hero_pathfinding, but didn't disable the check in the NPC movement
>> code.
>>
>>
> No need for concern, actually :) That code you quoted there actually has
> nothing at all to do with touch NPC activation. That is "use" NPC
> activation when using mouse/touch controls.
>
> It happens to strongly resemble touch activation, but is a separate thing.
> I can add a comment there to clarify that.
>

Ah, whoops!
Right, so clicking on an NPC activates it, but the scripted equivalent is
to write
  hero chases npc(me, npcref, true)
  wait for hero
  # Should maybe test if the NPC was reached and still exists
  use npc(npcref)
A builtin script to do all of that might be useful.
One thing worth considering is the ability to emulate builtin controls with
script commands. For example suppose you have a minimap on the screen and
want clicking on it to work the same as clicking on the map. Unfortunately
there are all these exceptions in which scripted pathing differs from
user-caused pathing. Maybe extra options to set by_user = YES would be
useful. Not that important though.


>
>
>> * In fact, there is no command to suspend NPC activation, except for
>> "suspend obstruction" and "set npc usable"! The lack of a "suspend npc
>> activation" command is a pretty huge oversight.
>>
>
> That is something I ought to add. Thanks for the reminder :)
>
>
>>
>> On 27 March 2018 at 11:15, <subversion at hamsterrepublic.com> wrote:
>>
>>> james
>>> 2018-03-26 15:15:12 -0700 (Mon, 26 Mar 2018)
>>> 217
>>> Add a .by_user member to the HeroPathing object and use it to
>>> distinguish between built-in user pathing and scripted hero pathing
>>> Options to cancel pathing on textbox, menus, and battles only apply when
>>> .by_user = YES
>>> ---
>>> U   wip/game.bas
>>> U   wip/game.bi
>>> U   wip/game_udts.bi
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> ohrrpgce at lists.motherhamster.org
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>>
>>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20180327/ac666ee1/attachment.html>


More information about the Ohrrpgce mailing list