[ DEV ] InfinityScript Suggestions

InfinityScript plugins for dedicated servers.
cubrr
TeknoMan
TeknoMan
Posts: 138
Joined: Sun Oct 05, 2014 12:54 am

Re: [ DEV ] InfinityScript Suggestions

Postby cubrr » Fri Mar 04, 2016 3:53 pm

c4271605 wrote:I'm confused. Did you just mix STL with GSC?

I'm just saying that perhaps he thought of std::vector when he thought of the term "vector".
User avatar
S3VDIT0
TeknoCow
TeknoCow
Posts: 68
Joined: Tue Jun 16, 2015 7:50 am
Location: Russian Federation
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby S3VDIT0 » Mon Mar 07, 2016 5:29 pm

Think can vehicle and helicopter to move independently at a predetermined position? Without using: MoveTo/MoveX/MoveY/MoveZ
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Mar 07, 2016 5:44 pm

S3VDIT0 wrote:Think can vehicle and helicopter to move independently at a predetermined position? Without using: MoveTo/MoveX/MoveY/MoveZ

You could set Origin.X/Y/Z to move it if you don't want to use moveTo
User avatar
S3VDIT0
TeknoCow
TeknoCow
Posts: 68
Joined: Tue Jun 16, 2015 7:50 am
Location: Russian Federation
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby S3VDIT0 » Mon Mar 07, 2016 6:14 pm

Slvr99 wrote:
S3VDIT0 wrote:Think can vehicle and helicopter to move independently at a predetermined position? Without using: MoveTo/MoveX/MoveY/MoveZ

You could set Origin.X/Y/Z to move it if you don't want to use moveTo

I would love to, but it crashes the server...
And moveTo moves the helicopter in the wrong direction. In the game scripts the movement of helicopters to be something like this:

Code: Select all

    self Vehicle_SetSpeed( 60, 25 );
    self setyawspeed( 75, 45, 45 );

There are no such functions in InfinityScript. Of course, you could use

Code: Select all

Function.AddMapping("remotecontrolvehicle", 33256);

but it is the abuse of a helicopter!
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Mon Mar 07, 2016 11:00 pm

S3VDIT0 wrote:
Slvr99 wrote:
S3VDIT0 wrote:Think can vehicle and helicopter to move independently at a predetermined position? Without using: MoveTo/MoveX/MoveY/MoveZ

You could set Origin.X/Y/Z to move it if you don't want to use moveTo

I would love to, but it crashes the server...
And moveTo moves the helicopter in the wrong direction. In the game scripts the movement of helicopters to be something like this:

Code: Select all

    self Vehicle_SetSpeed( 60, 25 );
    self setyawspeed( 75, 45, 45 );

There are no such functions in InfinityScript. Of course, you could use

Code: Select all

Function.AddMapping("remotecontrolvehicle", 33256);

but it is the abuse of a helicopter!

I haven't experimented with Helicopters enough to give you a proper answer then =/
I could suggest to mess with the helicopter fields in IS and see if you can get something to work:

Code: Select all

"veh_speed"
"veh_pathspeed"
"veh_transmission"
"veh_pathdir"
"veh_pathtype"
"veh_topspeed"
"veh_brake"
"veh_throttle"

I've tried using these and had no luck, but I gave up early so they may do something.
I don't know every field type here, but most of them are self-explanatory =P
User avatar
S3VDIT0
TeknoCow
TeknoCow
Posts: 68
Joined: Tue Jun 16, 2015 7:50 am
Location: Russian Federation
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby S3VDIT0 » Tue Mar 08, 2016 6:41 am

Thanks, I will experiment!
Here's another question, this Field or Call?
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Tue Mar 08, 2016 4:26 pm

S3VDIT0 wrote:Thanks, I will experiment!
Here's another question, this Field or Call?

Those are Fields =P
A few of them are set as strings and others are ints.
User avatar
S3VDIT0
TeknoCow
TeknoCow
Posts: 68
Joined: Tue Jun 16, 2015 7:50 am
Location: Russian Federation
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby S3VDIT0 » Tue Mar 08, 2016 5:38 pm

Slvr99 wrote:
S3VDIT0 wrote:Thanks, I will experiment!
Here's another question, this Field or Call?

Those are Fields =P
A few of them are set as strings and others are ints.

Damn.
These same Fields in the file Entity.cs forgot about it. I checked it recently, some crashes, even Vector3/Parametrs/int/string checked there are NO results, perhaps it was necessary for one to choose the right Fields, but not massively as it was for me ;>
User avatar
Slvr99
TeknoPrincess
TeknoPrincess
Posts: 270
Joined: Wed Apr 18, 2012 7:53 pm
Location: Florida
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby Slvr99 » Tue Mar 08, 2016 6:18 pm

S3VDIT0 wrote:
Slvr99 wrote:
S3VDIT0 wrote:Thanks, I will experiment!
Here's another question, this Field or Call?

Those are Fields =P
A few of them are set as strings and others are ints.

Damn.
These same Fields in the file Entity.cs forgot about it. I checked it recently, some crashes, even Vector3/Parametrs/int/string checked there are NO results, perhaps it was necessary for one to choose the right Fields, but not massively as it was for me ;>

IS is weird when it comes to fields. It seems as if IS doesn't actually check the GSC fields, but has it's own group of fields it uses. Setting fields still works as GSC does, but you can't GetField on a GSC-defined field. Using GetField on fields that aren't defined by IS will return null and even some defined by IS return a blank string.
User avatar
S3VDIT0
TeknoCow
TeknoCow
Posts: 68
Joined: Tue Jun 16, 2015 7:50 am
Location: Russian Federation
Contact:

Re: [ DEV ] InfinityScript Suggestions

Postby S3VDIT0 » Wed Mar 09, 2016 4:35 pm

I understand you. What do you think is it possible to calculate all the Entity and read their Fields?
Let's say this way:

Code: Select all

            for (int i = 0; i < 2048; i++)
            {
                Entity entity = Call<Entity>("getentbynum", i);
                using (StreamWriter sw = new StreamWriter("scripts\\AllEntity.txt", true))
                {
                    sw.WriteLine(/* Ex: entity.GetField<string>("name")> */);
                }
            }

So the idea is you can compute Fields to the existing objects on the level, but these are just my guesses, which probably will not work...

Return to “InfinityScript”

Who is online

Users browsing this forum: No registered users and 29 guests