Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,775 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

julionib

[TUT] How to create VB.Net scripts

Recommended Posts

julionib
I think you pasted the wrong code of the Sound Demo Script .

When I open console and press "sd" , nothing happen , then I read the script , I see this

 

....If e.Key = Keys.NumPad0 Then           For Each o As GTA.Object In World.GetAllObjects               If Exists(o) AndAlso (o.Position.DistanceTo(Player.Character.Position) < 5) Then                   Native.Function.Call("PLAY_SOUND_FROM_OBJECT", soundID, "GENERAL_WEAPONS_ROCKET_LOOP", o).....

 

Please check again and post the right code , Thank for your tut , It's cool cookie.gifcookie.gif

no, you probably downloaded the link that came before the soundsDemo hehe, that link is the script used in the tutorial.

 

this link: http://pastebin.com/1AFvAA16

 

 

 

the link for the sound demo is in the sound demo section:

 

"The Sounds demo script and the sounds list

 

Maybe you are asking yourself now: Where i can find the name of the game sounds to use? Here.

 

Press Control+S to save the file in your Scripts folder, save with the name sounds.txt, why? Because you will use this txt file with my Sound Demo script, so, download the script and the sounds.txt file and put in your Scripts folder, in the game press " to see the console window, type the command "sd" to enable the script:"

 

this is the link: http://pastebin.com/hN27pq2W

 

also you will need to sounds.txt file:

 

https://docs.google.com/file/d/0B3cG7oH8rH2...dit?usp=sharing

 

 

 

 

i did some improves in that soundsDemo script, i updated the pastebin post wtih the new code

 

Share this post


Link to post
Share on other sites
julionib
Julio, You should add instruction how add screen effect tutorial smile.gif

Like draw sprites on screen using graphics event?

Share this post


Link to post
Share on other sites
julionib
A mod would not be completed if u miss "Animation" smile.gif

yes, i will add an tutorial about what i know about anims ^^

Share this post


Link to post
Share on other sites
Nevitro
Julio, You should add instruction how add screen effect tutorial smile.gif

Like draw sprites on screen using graphics event?

No, i mean blood effect in chainsow mod smile.gif

Share this post


Link to post
Share on other sites
julionib
Julio, You should add instruction how add screen effect tutorial smile.gif

Like draw sprites on screen using graphics event?

No, i mean blood effect in chainsow mod smile.gif

ah, the blood drips on screen? ok i will release that source soon, will be in the Classes tutorial

Share this post


Link to post
Share on other sites
Nevitro

Okey thanks smile.gif

Share this post


Link to post
Share on other sites
123iamking

Can you upload the source code of Iron man IV script ? I saw u got a lot of examples from that script smile.gif

Share this post


Link to post
Share on other sites
123iamking

Is there anyway to make the "camera chase the bullet" like in some pfs games (when we do the execution) ? smile.gif

Share this post


Link to post
Share on other sites
girish_is_gay

yes, u can create a new camera and make it travel somewhere at a desired speed, maybe add sound sfx and u have a bullet cam, ur not actually tying the camera to a bullet u just control a cmaera and when camera hits a ped u can then trigger a bullet to hit them with a native function

 

have u downloaded the freecam by ra's al ghul? that shows u how to move a camera but that is moving camera with joystick

Share this post


Link to post
Share on other sites
julionib
Can you upload the source code of Iron man IV script ? I saw u got a lot of examples from that script smile.gif

here goes:

 

http://gtaxscripting.blogspot.com.br/2013/...ource-code.html

 

scroll to the end of the post and you will see the link

 

 

obs.: it's a mess, more organized than Ghost Rider but still a mess ^^

Share this post


Link to post
Share on other sites
julionib

Added two tuts: Ped flight ideas and tutorial about animations

Share this post


Link to post
Share on other sites
Nevitro

Julio, i saw animation flags and You did not include:

 

-flag without animation for legs

Mayby this is not important, but i think You should add this. I remeber [not sure] the flag number 09 play without legs.

 

 

 

SET_CHAR_ANIM_CURRENT_TIME - We can use this method to set the animation time, 1.0 is 100%, the end, 0 is the start, very useful to control the animation, we can make and fake reverse playback reducing the percent number, params: ped, category name, animation name and playback percent/100 (from 0 to 1.0)

 

 

I did not know that! Thanks! smile.gif

Share this post


Link to post
Share on other sites
julionib
Julio, i saw animation flags and You did not include:

 

-flag without animation for legs

Mayby this is not important, but i think You should add this. I remeber [not sure] the flag number 09 play without legs.

 

 

 

SET_CHAR_ANIM_CURRENT_TIME - We can use this method to set the animation time, 1.0 is 100%, the end, 0 is the start, very useful to control the animation, we can make and fake reverse playback reducing the percent number, params: ped, category name, animation name and playback percent/100 (from 0 to 1.0)

 

 

I did not know that! Thanks! smile.gif

mmm, the 09 was there but i used incorrect explanation, this seems to be indicated to use while inside vehicles.

 

thx

Share this post


Link to post
Share on other sites
Nevitro

Julio, You need do more tests... the:

 

SET_CHAR_ANIM_CURRENT_TIME - We can use this method to set the animation time, 1.0 is 100%, the end, 0 is the start, very useful to control the animation, we can make and fake reverse playback reducing the percent number, params: ped, category name, animation name and playback percent/100 (from 0 to 1.0)

 

 

is not TRUE!

 

This use time how long play current animation, NOT from what point of time. So, You can not do reverse animation.

1.0 - not play anim

0.5 - ped will play half animation.

0.0 - play normal all anim

Share this post


Link to post
Share on other sites
julionib

here im my tests works like i said in tutorial, for example in my Hulk mod im using:

 

 

Dim tmpAnimTime As Double = Player.Character.Animation.GetCurrentAnimationTime(animSetClimb, animAirFalling)               If tmpAnimTime >= 0.6 Then                   If tmpAnimTime < 0.75 Then                       jumpAnimPercentModifier = 0.007                   ElseIf tmpAnimTime > 0.95 Then                       jumpAnimPercentModifier = -0.007                   End If                   jumpAnimPercent += jumpAnimPercentModifier                   Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, animSetClimb.Name, animAirFalling, 0.1)                   Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", Player.Character, animSetClimb.Name, animAirFalling, jumpAnimPercent)               Else                   jumpAnimPercent = 0.6                   Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, animSetClimb.Name, animAirFalling, 1.2)               End If

 

 

i call this in the main tick of the script, but even if you call just one time it works fine

Share this post


Link to post
Share on other sites
Nevitro

FIXED

 

Game just laggy... You need or big scripts like Yours or put Wait, because script task to play animation... but he just play animation after set of time... Some interval between play and set what point to use - is IMPORTANT.

 

Please, put this warning in tutorial.

 

Thanks and sorry.

Edited by Nevitro

Share this post


Link to post
Share on other sites
julionib

oh yeah

 

hehe

 

i usually use 100 as time wait before start checking anim playing or set anything related to anim

Share this post


Link to post
Share on other sites
123iamking

Can you make Tut about draw things (adding picture, load texture available in game) on the screen and effect (like make pictures slowly blur and disappear) ?

Your TUT is awesome icon14.gificon14.gif

Share this post


Link to post
Share on other sites
Michael Wojtanis

Blur? I do not think this is possible ;P But never tried... ;p JulioNib? smile.gif

Share this post


Link to post
Share on other sites
julionib

the blur i dont know, but i will write a tut about what i know about drawing on screen using event and methods

Share this post


Link to post
Share on other sites
pedro2555
unfortunately i didnt find anything related to blur or semi transparent image draw sad.gif

Isn't transparency part of a png graphics file ?

Share this post


Link to post
Share on other sites
julionib

yes, but the idea is change it in script, like fade in and out

Share this post


Link to post
Share on other sites
julionib

well, we can have some predefined PNG, based on player health lose we can change the face to pain, when shooting we can change to rage expression.

 

the e.graphics.drawSprite can handle it

Share this post


Link to post
Share on other sites
123iamking

Can you make TUT 'bout camera please smile.gif ?

PS :

btw , 'bout your Iron IV mod, it's great , I think it's the best mod I ever play , but you added the native function "SET_DRAW_PLAYER_COMPONENT" (that makes the body part visible , not invisible one) in a tick method , that causes every milli-seconds the script call that function (even when the Iron man's suit is not activated) . therefore , your Iron man mod make my Hollow man mod (just a mod make the player "no head") unusable - every time I make the player's head invisible , your Iron man script make his head visible again . Can you fix that please smile.gif ? thanks for reading smile.gif

Share this post


Link to post
Share on other sites
julionib

maybe, need to rethink my code

Share this post


Link to post
Share on other sites
julionib

added simple menu class tut

 

next: cameras

Share this post


Link to post
Share on other sites
Michael Wojtanis

Classes...

Okey i did not understand much.

There is just something as a "foreach" many times in tick?

Old tutorials was good, because "step to step" but now... i see "okey, X= 10, Y=20... oh sh*t" biggrin.gif

 

What is floating peds? A list?

What is doing the "tick" on down? [floatingPeds©.Tick()]? Just run the general tick again?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.