Jump to content
  • 0

Source code location for event activator Key


AccurateNoodle

Question

Hey there,

 

Been looking for awhile now, I can't seem to find the piece of code that handles the AttackInteract input, when you activate an event via the Attackinteract key. I would like to change that key.

 

Where is this located?

 

Thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

 

I found:

            foreach (MapInstance eventMap in Maps.MapInstance.Lookup.Values)
            {
                foreach (var en in eventMap.LocalEntities)
                {
                    if (en.Value == null)
                    {
                        continue;
                    }

                    if (en.Value.MapId == map && en.Value.X == x && en.Value.Y == y)
                    {
                        if (en.Value is Event)
                        {
                            //Talk to Event
                            PacketSender.SendActivateEvent(en.Key);
                            AttackTimer = Timing.Global.Milliseconds + CalculateAttackTime();

                            return true;
                        }
                    }
                }
            }

 

In Player.cs, this was it, and I managed to do the changes. :)

Link to comment
Share on other sites

×
×
  • Create New...