Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Setting set values (https://forums.graalonline.com/forums/showthread.php?t=134266504)

greggiles 05-24-2012 03:53 AM

Setting set values
 
Quick question forums!

I am triggering an npc from a distance so I increased the value of the x-value.
Problem I'm having, is it only works from the left side because if I were facing left (on the right side of the NPC) the value would have to be negitive.

temp.tnpcs = findareanpcs(temp.x, temp.y, 10, 2);

^
So I want to make this '10' a 10 through -10.

Iv'e tried some different ways but I get errors. Any thoughts?

fowlplay4 05-24-2012 03:56 AM

Offset the x position, and add the amount you offset to your width.

temp.tnpcs = findareanpcs(temp.x - 10, temp.y, 20, 2);

greggiles 05-24-2012 05:31 AM

Thank you fowlplay!!!!


All times are GMT +2. The time now is 07:34 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.