|
 |
|
|
|
|
|
GTA Modification Forums
[BETA] GTAIV .Net ScriptHook V1.6.1.1 Released 1.0.6.0 / EFLC Support
 |
|
 |
| |
KewlAzMe  |
|
Player Hater

Group: Members
Joined: Jul 1, 2005

|
| QUOTE (HazardX @ Jan 16 2009, 20:00) | | QUOTE (basketballjones @ Jan 15 2009, 12:59) | is the list of objects/variables going to be extended to all of the same things that the c++ hook covers? even those in the scriptingdirty.h (eventually) |
To make a little clearer what KewlAzMe meant: You should use VisualStudio to edit the scripts (open the SLN files to get a functional VS project). It will tell you which classes and functions are available when they are required (for example pops a list up when you type a dot). this functionality is called "intellisense".
@KewlAzMe: No, it is not possible to change the AmmoType per script. You have to edit the WeaponInfo.xml to do this. |
How about controlling player/vehicle relationships? Like: if p.Vehicle(v).HonkingHorn then p.Vehicle(v).velocity = 400000 end if etc. Also, there is a "LeaveVehicle" but no "EnterVehicle" event. Can that be added? This post has been edited by KewlAzMe on Friday, Jan 16 2009, 21:20
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
iriedreadlock23  |
Posted: Saturday, Jan 17 2009, 20:03
|
Dr. Frankenstein

Group: Members
Joined: Jan 14, 2009

|
Thank you very much.
I realized in the meanwhile. Installed VS2008, and problem solved. Im impressed with the way script works, excellent job. But im intrerested now in possibility to use other native functions. Is there any experimental wrap throughout your library, so i can call functions like SET_TAXI_LIGHTS... and such? It would be awesome, so it could extend functionality of scripts. I was working on a thing so when i press certain key, i get my bodyguards find closest vehicle, and get into it. But i need more native functions, to make them actually run in convoy and get them to drive any car behind the player. Also, to search transportation if passenger limit in players car is full.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
HazardX  |
Posted: Saturday, Jan 17 2009, 20:16
|
pedestrian mangler

Group: Members
Joined: Dec 13, 2008


|
| QUOTE (iriedreadlock23 @ Jan 17 2009, 20:03) | Thank you very much.
I realized in the meanwhile. Installed VS2008, and problem solved. Im impressed with the way script works, excellent job. But im intrerested now in possibility to use other native functions. Is there any experimental wrap throughout your library, so i can call functions like SET_TAXI_LIGHTS... and such? It would be awesome, so it could extend functionality of scripts. I was working on a thing so when i press certain key, i get my bodyguards find closest vehicle, and get into it. But i need more native functions, to make them actually run in convoy and get them to drive any car behind the player. Also, to search transportation if passenger limit in players car is full. |
I hope to get the new release ready tonight. it includes a way to call native functions directly. here is an example: | CODE | Dim CarPointer As New Native.Pointer(GetType(Vehicle)) Native.Function.Call("GET_CAR_CHAR_IS_USING", Player.Character, CarPointer)
Dim ModelPointer As New Native.Pointer(GetType(Model)) Native.Function.Call("GET_CAR_MODEL", CarPointer.ToInputParameter, ModelPointer)
Dim name As String = Native.Function.Call(Of String)("GET_DISPLAY_NAME_FROM_VEHICLE_MODEL", ModelPointer.ToInputParameter) |
Also included are Tasks and TaskSequences. The included example shows how to enter every car as passenger, and force the driver to bring you to your currently selected waypoint.  But your idea is great. maybe i'll modify the included bodyguard example to make them use cars, if i've got enough time now, otherwise later. @KewlAzMe: No, there is no way to do this right now. We haven't found a native function to achieve this, til now. As Intosia said, there are the World.GetClosestPed (which doesn't work very good at the moment) and World.GetClosestVehicle functions. This post has been edited by HazardX on Saturday, Jan 17 2009, 20:20
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
iriedreadlock23  |
Posted: Saturday, Jan 17 2009, 22:49
|
Dr. Frankenstein

Group: Members
Joined: Jan 14, 2009

|
Im impatient for the new release. Is there any beta release? Maybe you could put what you have done so far, and we can test it, get some new ideas to the front. Im working on getting information from nearby peds, but im having problem with understanding function "GetClosestPed( Vector3, Single)... So what would be proper look of the function in use? What do i use for single? 1.0F, 6.0F? It should be like radius, so how do set proper radius in game metrics? Coz this way i get very random result, i dont know which ped gets found by this function.
Also, how can I put Peds back into a same game group? They sometimes go and kill each other. And I noticed that if you put like 10-20 guards, some of them dont follow you. I tried refreshing them, all one by one, with 'for each[I]' by SetPathFinding, but they just then go after me, start to shoot at me. Maybe it has to do that after player dies, game just remove all peds from your custom group...
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
HazardX  |
Posted: Saturday, Jan 17 2009, 23:06
|
pedestrian mangler

Group: Members
Joined: Dec 13, 2008


|
| QUOTE (iriedreadlock23 @ Jan 17 2009, 22:49) | Im impatient for the new release. Is there any beta release? Maybe you could put what you have done so far, and we can test it, get some new ideas to the front. Im working on getting information from nearby peds, but im having problem with understanding function "GetClosestPed( Vector3, Single)... So what would be proper look of the function in use? What do i use for single? 1.0F, 6.0F? It should be like radius, so how do set proper radius in game metrics? Coz this way i get very random result, i dont know which ped gets found by this function.
Also, how can I put Peds back into a same game group? They sometimes go and kill each other. And I noticed that if you put like 10-20 guards, some of them dont follow you. I tried refreshing them, all one by one, with 'for each[I]' by SetPathFinding, but they just then go after me, start to shoot at me. Maybe it has to do that after player dies, game just remove all peds from your custom group... | I hope to get the new release up in the next hours. The GetClosestPed functions is very tricky currently... you are right, the parameter is the distance (in meters/yards... at least almost). but thats not the problem. internally there are 2 more parameters that seem to control what kind of peds will be returned by the functions. however, i found no combination yet that gives reliable results. Groups have a maximum number of members. for the player group it seems to be 7. As soon as you add more, one of them will just "fall out" of the group. the roblem is, that the function to get the maximum number of members is still completely unknown. i've got the name (FIND_MAX_NUMBER_OF_GROUP_MEMBERS) but noone seems to know which parameters it takes. i'll try to find it out though.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
HazardX  |
|
pedestrian mangler

Group: Members
Joined: Dec 13, 2008


|
NEW VERSION: GTAIV .Net Script Hook v0.73 BETAChanges in Version 0.73 BETA: - Scripts reload now if the game reloads - Fixed wrong color values - Renamed many functions to make more sense (don't complain, i warned you  ) - also renamed Ped.Tasks to Ped.Task - more examples (including the more complex AnyTaxiScript) - new Classes/Functionality: -> Many Tasks and TaskSequences for Peds -> Native Function support (Native.Function.Call) -> Minimal Camera support -> Minimal Blip support -> MANY more small things...  The mentioned AnyTaxiScript allows you to enter any car as passenger and force the driver to bring you to a specific coordinate... as fast as possible. Also very interesting are the new Tasks and TaskSequences. Use Ped.Task if you want to run a single task, or create a (reuseable) sequence of tasks with TaskSequence. Here is an example: | CODE | Private FleeTask As New TaskSequence FleeTask.AddTask.SwapWeapon(Weapon.Handgun_Glock) FleeTask.AddTask.FightAgainst(Player, 5000) ' fight 5 sec FleeTask.AddTask.FleeFromChar(Player, False, 5000) ' flee 5 sec FleeTask.AddTask.Die() ' and then die
ped.Task.PerformSequence(FleeTask) |
Native calls are now possible too: | CODE | Dim CarPointer As New Native.Pointer(GetType(Vehicle)) Native.Function.Call("GET_CAR_CHAR_IS_USING", Player.Character, CarPointer)
Dim ModelPointer As New Native.Pointer(GetType(Model)) Native.Function.Call("GET_CAR_MODEL", CarPointer.ToInputParameter, ModelPointer)
return Native.Function.Call(Of String)("GET_DISPLAY_NAME_FROM_VEHICLE_MODEL", ModelPointer.ToInputParameter) |
@iriedreadlock23: The old FunctionContext class (which was for Lua-like native calling) has been replaced by the new and much better Native.Function.Call (see above). This post has been edited by HazardX on Sunday, Jan 18 2009, 20:22
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:
Pages:
(146) 1 [2] 3 4 ... Last »
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|