Page 5 of 6

Re: [ DEV ] InfinityScript Suggestions

Posted: Fri Mar 04, 2016 3:53 pm
by cubrr
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".

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Mar 07, 2016 5:29 pm
by S3VDIT0
Think can vehicle and helicopter to move independently at a predetermined position? Without using: MoveTo/MoveX/MoveY/MoveZ

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Mar 07, 2016 5:44 pm
by Slvr99
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

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Mar 07, 2016 6:14 pm
by S3VDIT0
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!

Re: [ DEV ] InfinityScript Suggestions

Posted: Mon Mar 07, 2016 11:00 pm
by Slvr99
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

Re: [ DEV ] InfinityScript Suggestions

Posted: Tue Mar 08, 2016 6:41 am
by S3VDIT0
Thanks, I will experiment!
Here's another question, this Field or Call?

Re: [ DEV ] InfinityScript Suggestions

Posted: Tue Mar 08, 2016 4:26 pm
by Slvr99
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.

Re: [ DEV ] InfinityScript Suggestions

Posted: Tue Mar 08, 2016 5:38 pm
by S3VDIT0
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 ;>

Re: [ DEV ] InfinityScript Suggestions

Posted: Tue Mar 08, 2016 6:18 pm
by Slvr99
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.

Re: [ DEV ] InfinityScript Suggestions

Posted: Wed Mar 09, 2016 4:35 pm
by S3VDIT0
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...