Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

[Q] C# .NET Scripthook - open doors SLOWLY


Threepwood
 Share

Recommended Posts

Eyho,

 

How would I open doors slowly?

 

// float door is a value which contains a number of which door it is (e.g. 0 = frontleft)// speedOp should be a value which tells the steps, e.g. 0.002° per cycle// whichDir is just if OPEN(auf) or CLOSE(zu) the doorprivate void moveDoorsSlow(float dOor, float speedOp, string whichDir) {           if (Player.Character.isInVehicle())           {                    Vehicle veh = Player.Character.CurrentVehicle;               switch (whichDir)               {                   case "auf":                       veh.Door((VehicleDoor)dOor).Angle = 0;                       while (!veh.Door((VehicleDoor)door).isFullyOpen)                       {                       veh.Door((VehicleDoor)dOor).Open();                       break;                       }                   case "zu":                       while (veh.Door((VehicleDoor)dOor).isOpen)                       {                           veh.Door((VehicleDoor)dOor).Angle = veh.Door((VehicleDoor)dOor).Angle --; // does NOT work                       }                       veh.Door((VehicleDoor)dOor).Close();                       break;               }           }

 

And how the heck do I get the keypress "braking"? A small if-statement as example would be nice. Thats most important to me actually.

Help, please? confused.gif

 

 

C'mon guys, 2 days later and noone has an idea or at least a question because I wrote sh*t?

 

`Ello?

Edited by Threepwood
Link to comment
Share on other sites

  • 3 weeks later...

'Ello?

 

Honestly, is this a community where noone knows anything? Or just too lazy/uppish to share knowledge? At least the brakepress thing is pretty important.

Link to comment
Share on other sites

'Ello?

 

Honestly, is this a community where noone knows anything? Or just too lazy/uppish to share knowledge? At least the brakepress thing is pretty important.

Can you seriously expect a response if you ask the community a question like that?

Link to comment
Share on other sites

Yes I can and I do, because I do believe there are at least 5 people on these forums who DO have any answer for this, and because it does not mean there is no sarcasm even if you do not see it.

 

So you really think my question ain't legit in any matter? It surely is. My request ain't stupid, ain't written in any hax0r language, ain't born out of lazyness and I used an understandable english and proper/honest/kindly language. And still, after nearly one month(!) not even one answer like a silly "Sorry dude, ain't possible.", instead, your "nice" comment. Conclusion: all those people with knowledge are too uppish to share their knowledge, or all users here are as stupid as me. Latter one is the less plausible, don't you agree?

Link to comment
Share on other sites

thaCURSEDpie

Dude first of all: fix your attitude, it's annoying. I'm actually not sure if I am gonna answer because I am really pissed off...

 

Second of all: IV modding is still in it's early stages. Though we do have ASI-loaders, hooks and such, we are not really experienced with it all, so therefore not a lot of people know stuff.

 

Third of all: the people who do know some stuff (like me, though that does sound a little smug, but it's true tounge.gif) are not always on-line. We have lives, we sometimes don't feel like coming here, we sometimes are busy. And sometimes someone's attitude is soo frickin' annoying that we dont respond...

 

 

To get back to your issue:

As far as I know there is currently NO WAY to set a door's angle. This is because currently 99.99999% of all script modding is done using native functions. So we're limited. There is a function called "GET_DOOR_ANGLE_RATIO" but that's read-only, obviously.

 

Also, make yourself more clear:

 

And how the heck do I get the keypress "braking"? A small if-statement as example would be nice. Thats most important to me actually.

Help, please? confused.gif

 

What do you mean? I do not understand it.

If you wanna know how to handle keypresses -> see the example script which comes with the .Net scripthook.

If you wanna know how "break;" works, look up some C# tutorials.

 

Link to comment
Share on other sites

Yes I can and I do, because I do believe there are at least 5 people on these forums who DO have any answer for this, and because it does not mean there is no sarcasm even if you do not see it.

 

So you really think my question ain't legit in any matter? It surely is. My request ain't stupid, ain't written in any hax0r language, ain't born out of lazyness and I used an understandable english and proper/honest/kindly language. And still, after nearly one month(!) not even one answer like a silly "Sorry dude, ain't possible.", instead, your "nice" comment. Conclusion: all those people with knowledge are too uppish to share their knowledge, or all users here are as stupid as me. Latter one is the less plausible, don't you agree?

Nobody wants to help an ignorant person, that's all.

Link to comment
Share on other sites

 

Nobody wants to help an ignorant person, that's all.

Where am I ignorant? Believe me, I really do not understand why you think I am ignorant. There aren't any answers to my month old question which I could ignore, there aren't any tutorials which would help me, that I ignore, there is simply nothing. So why am I ignorant? Serious, I don't get it. And besides, I think you would be one of those who might have the answer. But instead of helping out, you start ranting and wondering why I start to question the community itself. Best proof ever. Who is ignorant now?

 

 

@playaindahood: for several reasons, but the most important: COL weight has the bad behavior of letting doors bounce once they get an impulse of movement, for example using a rear door as vertical moving spoiler pops up w/o COL weight, but moves slowly and bounces with COL weight, once you drive over a hump or else. I could get rid of that bouncing w/o using COL weight, but that means it pops up immedately confused.gif But however I try to use door angle to loop through descending/ascending angles until full opening, it does not work (throwing errors because of wrong synthax or just not responding w/o any error). Same goes for that frikkin brake keypress event.

 

 

//Edit:

Got it, after long time of testing and work.

 

 

Edited by Threepwood
Link to comment
Share on other sites

  • 2 weeks later...

-deleted-

SRY, that got double posted.

Edited by Threepwood
Link to comment
Share on other sites

  • 2 months later...

Not that I would have any idea on how to mod GTAIV, but I believe this person had a genuine innocent question, and everyone else was the ignorant f*ck too lazy to answer them, when they did have to solution to his problem. Glad to see you finally managing to figure things out Threepwood, even if the whole community here is full of assholes.

Link to comment
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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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