Author Topic: How to use "Event property" correctly ??  (Read 6757 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13304
  • Activity:
    0.6%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: How to use "Event property" correctly ??
« Reply #15 on: March 04, 2011, 12:42:43 PM »
0
A good example for me is with my IDOC hunter.  Generally, you should always get a #PROPERTY back from a sign, but there are times when you are walking around WITH THE MOUSE (right click) that #PROPERTY comes back N/A.  So to fix this, what I do is force the character to stop (mouse click 0,0) and re-do the event property.  When you aren't moving, the #PROPERTY shows successfully. (this is why everyone likes my IDOC hunter because I handle all those signs that are "skipped" by other scripts)

A caviet to this is when you lock in your movement (always walk or left-click -> right-click) and move that way, event property magically starts working without issues.  Never tried to understand that dynamic, but I adapted to it and continued.  So I'm not certain the issue is actually lag because moving with right mouse depressed can bork the event property, but moving with autowalk lets event property work correctly.

--- Added

Also, there are creatures that never return a #PROPERTY.  Try it on an Orge.  ;)
« Last Edit: March 04, 2011, 12:49:54 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline AlphaTopic starter

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: How to use "Event property" correctly ??
« Reply #16 on: March 04, 2011, 02:05:56 PM »
0
Awesome... That helped alot...   It explains why my "People Detector" does fail on certain blue NPCS occasionally bc the event property doesn't update so it assumes the worst.  I'd always though it was simply a timing issue of recalling out of an area before #property could update or some such, but it could easily be the movement aspect .  Hmmmm... going to have to play with it now. 

Thx guys.. lol    I'm sure I can come up with many more "How to's" that  turn into 2 page answers heh.

Scrripty

  • Guest
Re: How to use "Event property" correctly ??
« Reply #17 on: March 04, 2011, 02:38:01 PM »
0
It's pretty simple to write scripts to test this, run this and you'll never come back with a response because #property will update correctly, along the lines of the way you're doing plants.  That's doing event property on 2 items as fast as it can possibly go with no error on my machine.  

Code: [Select]
set #lpc 9999
finditem #charid G
event property #findid
if #charname notin #property
 event sysmessage #property , Hello
event property #backpackid
if backpack notin #property
  event sysmessage #property , Booya

Now run this code below, and run around luna and watch the text fly.  As you're running, you wont get updates to #property and it will visually show you.  It's pretty simple to test.  The second you start moving with right click, you get no updates to most properties until you stop.  It just makes sense that its a lag reducing measure if you think about it as if you were a network programmer trying to solve client lag issues running through lots of items that are trying to update a lot of info on a small pipe.  The second you start moving off screen the info stops updating.  I'm sure if you increase/decrease your update range you'll notice a difference in when you start/stop updating info too.

Code: [Select]
finditem IS G
event property #findid
  if #property = $ || #property = n/a || #property =
    event sysmessage #property , NoName
« Last Edit: March 04, 2011, 02:40:15 PM by Scripty »

Tags: