Author Topic: How to use Script_GetPathArray (C#)  (Read 4264 times)

0 Members and 1 Guest are viewing this topic.

Offline rwo001Topic starter

  • Jr. Member
  • **
  • Posts: 45
  • Activity:
    0%
  • Reputation Power: 1
  • rwo001 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
How to use Script_GetPathArray (C#)
« on: November 30, 2013, 08:09:57 PM »
0
Code: [Select]
TMyPoint[] _path = Stealth.Script_GetPathArray(1011, 513, false, 0);
Console.WriteLine(_path.Length);
// Result : 0;
I can use Stealth.Script_MoveXY to move to the location but i can't get the path array..

Offline Orich

  • Jr. Member
  • **
  • Posts: 77
  • Activity:
    0%
  • Reputation Power: 3
  • Orich has no influence.
  • Respect: +12
  • Referrals: 1
    • View Profile
Re: How to use Script_GetPathArray (C#)
« Reply #1 on: November 30, 2013, 09:06:59 PM »
0
Nice to have someone testing out C# methods..  You are the first one to do it :)

These two functions :

Script_GetPathArray
and
Script_GetPathArray3D

I think they need a small fix in Stealth.exe.   I will update you ASAP
Member of the Stealth development team.
Author of Stealth .NET DLL

Offline rwo001Topic starter

  • Jr. Member
  • **
  • Posts: 45
  • Activity:
    0%
  • Reputation Power: 1
  • rwo001 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: How to use Script_GetPathArray (C#)
« Reply #2 on: November 30, 2013, 10:27:02 PM »
0
Nice to have someone testing out C# methods..  You are the first one to do it :)

These two functions :

Script_GetPathArray
and
Script_GetPathArray3D

I think they need a small fix in Stealth.exe.   I will update you ASAP
Oh..Thanks Orich.

I'm current working on convert my OpenEUO LUA code to C#.... :P

Offline Orich

  • Jr. Member
  • **
  • Posts: 77
  • Activity:
    0%
  • Reputation Power: 3
  • Orich has no influence.
  • Respect: +12
  • Referrals: 1
    • View Profile
Re: How to use Script_GetPathArray (C#)
« Reply #3 on: December 01, 2013, 03:19:09 AM »
0
https://bitbucket.org/Stealthadmin/stealth-beta-client/downloads#download-273630


Looks like I fixed it ... what a stupid bug

Can you check it out?
Member of the Stealth development team.
Author of Stealth .NET DLL

Offline rwo001Topic starter

  • Jr. Member
  • **
  • Posts: 45
  • Activity:
    0%
  • Reputation Power: 1
  • rwo001 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: How to use Script_GetPathArray (C#)
« Reply #4 on: December 01, 2013, 08:43:59 PM »
0
..It still have problem... :'(

// Current Position 1011,510;
TMyPoint[] _path = Stealth.Script_GetPathArray(1011, 508, false, 0);
Console.WriteLine(_path.Length);
for (uint i = 0; i < _path.Length; i++)
{
    Console.WriteLine(_path.X+","+_path.Y+","+_path.Z);
}
            
// Expected Output
2
1011,509,-70
1011,508,-70

// Real Output
2
1101,509,-3142
64515,47617,1011
« Last Edit: December 01, 2013, 08:59:57 PM by rwo001 »

Offline Orich

  • Jr. Member
  • **
  • Posts: 77
  • Activity:
    0%
  • Reputation Power: 3
  • Orich has no influence.
  • Respect: +12
  • Referrals: 1
    • View Profile
Re: How to use Script_GetPathArray (C#)
« Reply #5 on: December 02, 2013, 12:13:19 PM »
0
Tested and fixed.  Another stupid bug.

Download new version.


Add me to ICQ 691090807 ... Easier for fast fixes.  You are the only one testing C#, so better to talk in real time.
Member of the Stealth development team.
Author of Stealth .NET DLL

Offline rwo001Topic starter

  • Jr. Member
  • **
  • Posts: 45
  • Activity:
    0%
  • Reputation Power: 1
  • rwo001 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: How to use Script_GetPathArray (C#)
« Reply #6 on: December 02, 2013, 03:27:14 PM »
0
Its work. Thanks..

Sorry i don't use icq..and i think my time zone is different from you..i'm in GMT+8...
if you have skype, please add me : live:raywongsk

 ;)

Tags: