Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. 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. News

    2. Forum Support

    3. Site Suggestions

Knowledge Novice

Need help with SCM mod please

Recommended Posts

random_download

 


pqrs

 

Turns into:

 

pqrs

Share this post


Link to post
Share on other sites
Knowledge Novice

 

Turns into:

 

pqrs

Ok, I think I'm startin' to get it. Thanks guys.

 

I've been lookin' at this and I don't know what I'm overlooking. Everything seems to work fine EXCEPT, when I drive into the water, I die instead of respawning on land as I usually would in a car with immunities.

 

This should spawn a SabreTurbo directly in front of the Char (press Sprint + Look behind). While (and only while) driving this model car it should have immunities (bullet proof, fire proof, collision proof, explosion proof, and sink proof). The doors should also be locked unless pressing the unlock button (handbrake) and if flipped it should unflip automatically. I added the "set car [email protected] health to 2000" because, at times, the car may catch fire before coming to a complete stop and therefore still be on fire once it unflips. Although the car (on occasion) still may catch fire and explode if left on it's side for too long (ex. caught between a building and a lightpost ).

 

As I said above, the only problem I've noticed is that I die when I drive into water instead of respawning. Sorry if I'm missing the obvious, but I've honestly searched for the problem and I'm simply stuck.

 

:NameIt03A4: name_thread "SABRTUR":Turbo 0001: wait  50 ms00D6: if  0  0256:   player $PLAYER_CHAR defined 004D: jump_if_false ££Turbo00D6: if  0   00DE:   player $PLAYER_CHAR driving vehicle type #SABRETUR004D: jump_if_false ££Request03C1: [email protected] = player $PLAYER_CHAR car02AC: set car  [email protected] immunities  1  1  1  1  1053F: set car [email protected] tires vulnerable  0020A: set_car [email protected] door_status_to  20002: jump ££Check:Request0001: wait  10 ms00D6: if  200E1:   key_pressed  0  16  00E1:   key_pressed  0  190256:   player $PLAYER_CHAR defined004D: jump_if_false ££Turbo 04C4: create coordinate [email protected] [email protected] [email protected] from actor $PLAYER_ACTOR offset  0.0  4.0  0.00170: [email protected] = player $PLAYER_CHAR z angle0247: request_model #SABRETUR038B: load_requested_models  00D6: if  0  0248:   model #SABRETUR available   004D: jump_if_false ££Request00A5: [email protected] = create car #SABRETUR at [email protected] [email protected] [email protected]: release_model #SABRETUR0175: set car [email protected] z angle to [email protected]:Loop0001: wait  20 ms00D6: if  100E1:   key_pressed  0  16  00E1:   key_pressed  0  19 004D: jump_if_false ££Turbo0002: jump ££Loop :Check0001: wait  100 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££LoseStats00D6: if  000DE:   player $PLAYER_CHAR driving vehicle type #SABRETUR004D: jump_if_false ££LoseStats00D6: if  081F4:   NOT   car [email protected] flipped004D: jump_if_false ££TurnOver00D6: if  080E1:   NOT   key_pressed  0  6004D: jump_if_false ££Unlock00D6: if  08119:   NOT   car [email protected] wrecked004D: jump_if_false ££Remove0002: jump ££Check:LoseStats0001: wait  0 ms00D6: if  08119:   NOT   car  [email protected] wrecked004D: jump_if_false ££Remove020A: set_car [email protected] door_status_to  1053F: set_car  [email protected] tires_vulnerable  102AC: set_car  [email protected] immunities  0  0  0  0  0:Remove01C3: remove_references_to_car  [email protected] ;; Like turning a car into any random car0002: jump ££Turbo:TurnOver0001: wait 0 ms00D6: if  001F4:   car  [email protected] flipped004D: jump_if_false ££Check00AA: store car [email protected] position to [email protected] [email protected] [email protected]  0174: [email protected] = car [email protected] z angle00AB: put car  [email protected] at  [email protected] [email protected] [email protected]: set car [email protected] z angle to [email protected]: set car [email protected] health to  20000002: jump ££Check  :Unlock0001: wait  20 ms020A: set_car [email protected] door_status_to  100D6: if  0 00E1:   key_pressed  0  6004D: jump_if_false ££Turbo0002: jump ££Unlock

 

One more thing about my code. At first I had used [email protected] for

 

[email protected] = create car #SABRETUR at [email protected] [email protected] [email protected] car [email protected] z angle to [email protected]

 

as well as

 

 [email protected] = player $PLAYER_CHAR car

 

At first I thought that this may have been causing the problem, but didn't seem to make a difference once removed. I use different var so as to avoid any glitches but, if I wanted to spawn a car that kept it's immunities (instead of losing them when no longer driving it) could I just set the immunities to the create_car thread?

 

00A5: [email protected] = create car #SABRETUR at [email protected] [email protected] [email protected]

02AC: set car  [email protected] immunities  1  1  1  1  1

053F: set car [email protected] tires vulnerable  0

020A: set_car [email protected] door_status_to  2

 

I plan to practice with quoting. I just wish it didn't take so long to switch between screens.

Share this post


Link to post
Share on other sites
ceedj

Not sure if this will help, but I found this:

 

 

02bf:  has_car_sunk $Car

 

 

So mayhaps you could change your if check to an OR statement, like so:

 

 

:TurnOver0001: wait 0 ms00D6: if  2101F4:   car  [email protected] flipped02BF:   has_car_sunk [email protected]: jump_if_false ££Checketc...

 

 

You'll likely have to change your code in "Check" as well.

 

As for the second part, changing the varible from @4 to @9 will mean that the code will no longer be able to check for anything referenced by @4, unless you use local = local opcode. But I don't think you need to go that route at all. I'd leave your car as @4.

 

And the last part, yes, you can set the immunities as you mentioned, but keeping the variable as @4. What I might do is add a check to see if @4 is already created before trying to spawn another.

Share this post


Link to post
Share on other sites
Demarest

@KN: No offense intended (as I've done it myself MANY times), but this SERIOUSLY looks like code that started as one thing and was modified, patched, modified some more... I suggest now that you have it "working" to set aside and see if taking a blank slate, you can't draft a MUCH more concise version.

 

To answer your question, I don't see anything in the code that would respawn you if you fell in water. If I'm not too much mistaken, my Armor All use your current Z value to determine water since the water level in VC is predictable. With the advent of SA, some opcodes were determined to detect contact with water that were in VC's range IIRC. So perhaps there's an even more scientific manner of approach.

 

Why so many waits? Only loops need waits really. This code looks as if you're under the impression that each "paragraph" needs one and that simply isn't true.

 

Also, is model available loops should be separate for any number of reasons and should not include the actual request of the model.

 

 

And the last part, yes, you can set the immunities as you mentioned, but keeping the variable as @4. What I might do is add a check to see if @4 is already created before trying to spawn another.
But [email protected] is just the car that's created. It won't qualify for [email protected] until he gets in, which the beginning of the code is written to capture the car he occupies as [email protected] It DOES however mean that he should remove references to [email protected] immediately after creating it.

Share this post


Link to post
Share on other sites
Knowledge Novice

 

@KN: No offense intended (as I've done it myself MANY times), but this SERIOUSLY looks like code that started as one thing and was modified, patched, modified some more... I suggest now that you have it "working" to set aside and see if taking a blank slate, you can't draft a MUCH more concise version.

None taken. And yeah, this ones been sliced, diced, rearranged and dropped on the floor a couple of times. I find that it's sometimes easier to start with what I've seen in action and try adding things here and there to see how they work and interact. I'm glad you pointed that out though because cluttered code does make it harder to find my mistakes and more times than not I strive to get it working and then forget to clean up the mess I've made. muppetmaster_karma.gif

 

To answer your question, I don't see anything in the code that would respawn you if you fell in water. If I'm not too much mistaken, my Armor All use your current Z value to determine water since the water level in VC is predictable. With the advent of SA, some opcodes were determined to detect contact with water that were in VC's range IIRC. So perhaps there's an even more scientific manner of approach.

What I meant by respawn was the "freefall" down through the water and then being placed on land near where you sank. Most cars with immunities do this but my SabreTurbo simply sits in the water until my life hits zero and I'm wasted just like it had no immunities. Could it be because I had to request the model to create the Turbo? Another thing: I've used a parked_car_generator to spawn the Romero which didn't require requesting it's model. Can these two methods (create_car/parked_car_gen) be interchanged? I believe I first tried the car_generator to spawn the Turbo instead of create_car (which failed for me).

 

Why so many waits? Only loops need waits really. This code looks as if you're under the impression that each "paragraph" needs one and that simply isn't true.

 

Also, is model available loops should be separate for any number of reasons and should not include the actual request of the model.

Yeah. I get a little carried away. I sometimes forget that the code doesn't loop back on itself or worry that if I don't slow the code down it's gonna derail or something. I guess it goes back to splicing stuff together, then forgetting to tidy it up. Another bad habit in the making. anuj_cop.gif  And as for the model request and model check, I admit that I saw this but had my focus on another part of the code, I slapped the models part together with the intention of coming back to it. I tend to get side tracked. turn.gif

 

 

 

And the last part, yes, you can set the immunities as you mentioned, but keeping the variable as @4. What I might do is add a check to see if @4 is already created before trying to spawn another.
But [email protected] is just the car that's created. It won't qualify for [email protected] until he gets in, which the beginning of the code is written to capture the car he occupies as [email protected] It DOES however mean that he should remove references to [email protected] immediately after creating it.

That's something I didn't even think about. So, if I'm thinking right, it would be kind of like releasing a model after you're done with it except here I would Remove_reference to car [email protected]

 

 

Not sure if this will help, but I found this:

 

CODE 

02bf:  has_car_sunk $Car

 

 

This I had already tried using and failed. However, it wasn't because it was the wrong opcode to use, I just didn't think to try changing my If check (and I didn't know to change my :Check label). You guys rock. rah.gif

 

I still need to overhaul my code but by changing my :Check label to

 

:Check0001: wait  100 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££LoseStats00D6: if  000DE:   player $PLAYER_CHAR driving vehicle type #SABRETUR004D: jump_if_false ££LoseStats00D6: if  2 81F3:   NOT   car [email protected] airborne82BF:   NOT   car [email protected] sunk81F4:   NOT   car [email protected] flipped004D: jump_if_false ££TurnOver00AA: store car [email protected] position to [email protected] [email protected] [email protected]: [email protected] = car [email protected] z angle000F:  [email protected] -=  4.0 ;; floating-point values00D6: if  080E1:   NOT   key_pressed  0  6004D: jump_if_false ££Unlock00D6: if  08119:   NOT   car [email protected] wrecked004D: jump_if_false ££Remove 0002: jump ££Check

 

and my :TurnOver label to

 

:TurnOver00D6: if  2102BF:   car [email protected] sunk01F4:   car  [email protected] flipped004D: jump_if_false ££Check 0174: [email protected] = car [email protected] z angle00AB: put car  [email protected] at  [email protected] [email protected] [email protected]: set car [email protected] z angle to [email protected]: set car [email protected] health to  20000002: jump ££Check

 

I now no longer die when I drive the Turbo into the water but instead respawn at the last coor where my car was on dry land and stable. I used "000F: [email protected] -= 4.0" in my :Check label because otherwise, when I drove off a ledge I would respawn just far enough out to defeat my purpose, as I would just continue to fall over and over again.

I haven't quite got the quotes figured out yet. Sorry about the mess. blush.gif

 

 

Share this post


Link to post
Share on other sites
Knowledge Novice

Hey guys. After having little luck finding what I need by using search ( rolleyes.gif *cough, cough*) I was hopin' somebody could point me in the general direction of some info. I've had a little experience spawning actors in VC and would like to learn more about what can be done with them as far as setting their stats and such. More specifically, right now I'd like to find out about adding threats.

 

Using this code spawns an actor beside me that is armed with a Ruger. He has full immunities, 100% accuracy, and is tied to the player_char. I would like for him to shoot anyone who attacks me as well as anyone who I attack. He does this except he won't attack an officer unless I directly target the officer myself.

 

 

:NameIt03A4: name_thread "AI":RequestModels0247: request_model #PGA0247: request_model  #ruger038B: load_requested_models:LoadModels0001: wait  0 ms00D6: if  20256:   player $PLAYER_CHAR defined0248:   model #PGA available0248:   model  #ruger available004D: jump_if_false ££LoadModels04C4: create_coordinate  [email protected]  [email protected]  [email protected] from_actor $PLAYER_ACTOR offset  1.0  0.0 -1.0009A: [email protected] = create_actor  19 #PGA at  [email protected]  [email protected]  [email protected]: release_model #PGA01B2: give actor [email protected] weapon  27 ammo  99990249: release_model  #ruger02E2: set actor [email protected] weapon accuracy to  10002AB: set actor  [email protected] immunities  1  1  1  1  101DF: tie actor [email protected] to player $PLAYER_CHAR :FollowMe0001: wait  1000 ms00D6: if  210118:    actor [email protected] dead8256:   NOT   player $PLAYER_CHAR defined004D: jump_if_false ££FollowMe01C2: remove references to actor [email protected]: jump ££RequestModels 

 

 

Would I use this opcode?

 

03F1: pedtype  9 add threat  1

 

If so can anybody give me a hint as to where I can look to figure out what # corresponds to what threat?

 

I've also looked in the original scm (more specifically Guardian Angels) and have seen threat #'s anywhere from 1 to 16384. Seeing this only shows me that there seems to be a wide range of threats, but still leaves me not knowing what the numbers represent. I think I'm on the right track, but I'd appreciate a little feedback. Thanks in advance y'all. ph34r.gif

 

 

Share this post


Link to post
Share on other sites
Nur56

funny, how much you can learn from the first page.

 

 

EDIT:find the vercetti gang code. and imitate it with your new code.

Share this post


Link to post
Share on other sites
Wonderinguy

Where did you guys&girls learn all that stuff?

Share this post


Link to post
Share on other sites
Knowledge Novice

This isn't about the scm, it's a question about .ide's and draw distance. I just didn't want to make a new topic for such a noobish topic. Here's the deal, I'm using the Desert Hillclimb mod (for VC) and everything's working great but the hill doesn't appear until I'm right next to it. I would like to be able to see it from farther away so I've tried editing it's ide file but have run into a problem.

 

I tried raising the draw distance to a higher # but anything over 300 causes the model to become un-solid. The draw distance starts out at 299. I set it to about 600 (just to see what would happen) and I was very happy with the distance that it was visible from, but again the model isn't solid which defeats the purpose of having the mod in the first place.

 

Here are the original lines that I edit

 

4794, hillclimb, hillclimb, 1, 299, 04795, maingate, hillclimb, 1, 299, 04796, gate, hillclimb, 1, 299, 0

 

 

I know very little to nothing about modeling, but I am searching for info and just hoped someone could help me out or at least get me on the right track to finding a soloution. The most helpful info I've found so far is >[iII/VC] Map File Documentation & Troubleshooting - by: Opius< which seems to explain the details pretty well. It does make mention of setting the draw_distance between '0' and '300' so if these are the upper/lower limits why won't the Hill model show from a distance since it's set at 299? Any help or suggestions of any kind are appreciated. Thanks guys.

 

Share this post


Link to post
Share on other sites
JostVice

If you want to see the model more far away, you need to have more draw distance, but has you said, more of 300 causes the model unsolid. There are the LOD models who have a draw distance of 1000 or other value, there is a tutorial in the tutorial forum about how to create LODS for VC smile.gif

 

 

Share this post


Link to post
Share on other sites
Knowledge Novice

Many thanks Jost. I'll check it out and see how it works. icon14.gif

 

* EDIT *

Well, the only info that I can find is this - >Creating LODs For Buildings<. It's not very detailed (total of about three lines) and I've crashed my game about four times trying to figure it out but there's just not enough detail for me to understand exactly how to go about it. I put in a request for a tutorial. I just hope someone has the time to write something a little more in-depth. Thanks again though.

 

Edited by Knowledge Novice

Share this post


Link to post
Share on other sites
Bigun

There's not really any reason to post that question here. As you said, it doesnt have to do with the SCM, and doesn't belong in the Mission Coding section.

Share this post


Link to post
Share on other sites
Knowledge Novice

 

There's not really any reason to post that question here. As you said, it doesnt have to do with the SCM, and doesn't belong in the Mission Coding section.

Understood. Although I was hoping to eventually find more info on my own I was hopeful that someone here may have advice. I just wasn't sure if it deserved it's own topic elsewhere so I just posted it here. Sorry for any inconvenience I may have caused.

Share this post


Link to post
Share on other sites
Bigun

Most of the inconvienence is really done to you, so don't be that sorry. tounge.gif Remember that definetely not all modelers/map modders are also coders, that visit the Mission Coding section. If you want a faster response its obviously logically better to post in the right section, though instead of asking this particular question, I think some searching and digging a little further than you have could of answered it.

Share this post


Link to post
Share on other sites
Knowledge Novice

For Vice City

Hey guys. Question: If I use

 

01CA: actor [email protected] kill player $PLAYER_CHAR

 

to have an actor attack the player_char is it possible to reverse this?

 

For example

 

:Label_1waitifwanted_level >0jf Label_1actor (x) kill player_char:Label_2waitifNOT wanted_level >0jf Label_2? (what code?)jump Label_1

 

 

Here's part of my actual code

 

:Theft_Attempt00D6: if  2501Fd:   player $PLAYER_CHAR near car on foot [email protected] radius  5.0  5.0  0 ;; never used in VC01Fd:   player $PLAYER_CHAR near car on foot [email protected] radius  5.0  5.0  0 ;; never used in VC01Fd:   player $PLAYER_CHAR near car on foot [email protected] radius  5.0  5.0  0 ;; never used in VC01Fd:   player $PLAYER_CHAR near car on foot [email protected] radius  5.0  5.0  0 ;; never used in VC01Fd:   player $PLAYER_CHAR near car on foot [email protected] radius  5.0  5.0  0 ;; never used in VC01Fd:   player $PLAYER_CHAR near car on foot [email protected] radius  5.0  5.0  0 ;; never used in VC004D: jump if false ££Don't_Steal01CA: actor [email protected] kill player $PLAYER_CHAR 01CA: actor [email protected] kill player $PLAYER_CHAR0002: jump ££Don't_Steal     :Another_Chance01ED: reset actor [email protected] flags01ED: reset actor [email protected] flags 0002: jump ££Don't_Steal

 

I'm tryin' to make it so that if the player attempts to steal one of the specified cars, the actors start attacking him. If the character leaves the area then returns they won't attack unless he attempts to steal a car again. I could do this by destroying and recreating the actors, but I'm hoping that I can reuse the actors by just telling them to kill/not to kill the player.

 

I've seen some 'actor flags 1' and 'reset actor (x) flags' and have tried following the code in the main scm but get a bit lost. There also doesn't seem to be much info when I search the forums. I hate to be a bother but I could use a little help. Thanks in advance guys.

 

 

 

Share this post


Link to post
Share on other sites
ceedj

You can use 011C: clear_actor_objective to reset your actors from killing the player. What you could do is do a check to see if a player is in a certain range of the cars, and if he's far enough away, use the above code to reset the actors, then either walk (or run) them back to the guard point, or simple use the put_actor_at opcode. Then loop back to the area check you have done so it can run again.

 

011C will clear just about any state the actor is in EXCEPT

- the dance animation; you must reset with another wait state

- the riot animation; can only be cleared by an actor or the player attacking the actor who is doing the riot animation.

 

(Note that the above only appiles to VC and possibly GTA III, but NOT San An, as this opcode was removed from the game and replaced with 0687: clear_actor_task $actorID - one of my few useful contributions to opcode hunting. tounge.gif )

 

As for the first thing, are you trying to make the player kill the actor automatically? If so, you should be able to use 01C9: actor_kill_actor1, so it would read something like

 

 

01C9: actor PLAYER_ACTOR kill [email protected]

 

 

I just tested this in LC with my Studios hook and it does indeed work. Reset the player with above mentioned 011C. I'll be adding this to the next release. I'm not sure WHY I never thought of this before, but thanks. smile.gif

Edited by ceedj

Share this post


Link to post
Share on other sites
Knowledge Novice

It works! biggrin.gif As usual, you're the man, man. I also tried out the

 

01C9: actor PLAYER_ACTOR kill [email protected]

 

that's pretty cool too. One thing that's still got me stumped though is that the actors are stationary. At first I thought that they didn't move because they had Rugers and had the benefit of shooting long-range, but then I gave them Nitesticks with the same non-moving result. I actually have to walk up to them so they can knock me on the head. Here's what I've got

 

:Create_20001: wait  0 ms 00D6: if  1 023D:   special actor  2 loaded0248:   model #nitestick available004D: jump if false ££Create_2009A: create_actor  [email protected]  4 #SPECIAL02 at  88.23904 -769.7256 10.46329009A: create_actor  [email protected]  4 #SPECIAL02 at  99.38194 -774.9893 10.4632901B2: give actor [email protected] weapon  4 ammo  999901B2: give actor [email protected] weapon  4 ammo  99990223: set actor [email protected] health to  250 0223: set actor [email protected] health to  2500296: unload special actor  20249: release model #nitestick :Actor_Stats0350: unknown actor [email protected] not scared flag  10350: unknown actor [email protected] not scared flag  1020F: actor  [email protected] look at player $PLAYER_CHAR020F: actor  [email protected] look at player $PLAYER_CHAR02E2: set actor [email protected] weapon accuracy to  1002E2: set actor [email protected] weapon accuracy to  10

 

 

 

I'll be adding this to the next release. I'm not sure WHY I never thought of this before, but thanks. smile.gif

Glad I could inspire. And when you write the check for my cut of the profits just make it payable to 'CASH'. lol.gif

 

EDIT: I had already planed on leaving the actors stationary but wanted to know how to let them have the ability to move and follow the player when they were told to kill him. Like a dork I didn't think to change the flags on the 'not scared' command and I realize now that I didn't really give enough info dealing with my last question. This is my label that enables the actors to move as well as attack the player.

 

:Remember 0350: unknown actor [email protected] not scared flag  0 0350: unknown actor [email protected] not scared flag  001CA: actor [email protected] kill player $PLAYER_CHAR 01CA: actor [email protected] kill player $PLAYER_CHAR0002: jump ££Don't_Steal

 

In case anybody reads this, I'm not sure if this is enough for anyone but me to really understand what I've done, but the full code is a bit long and I don't see any reason to post it. Later guys.

 

Edited by Knowledge Novice

Share this post


Link to post
Share on other sites
Knowledge Novice

For Vice City

Got a question guys. For the most part I believe that I understand how to use

 

0057:   player $PLAYER_CHAR  0 ()in cube 42.66533 -815.9249 20.46329 144.5022 -737.2314 -20.46329

 

to create a defined area, but the cube seems to run parallel to the cardinal directions (N,S,E,W). My question is how can I define an area that is at an odd angle? For instance the buyable_assets across from Ken's office. If I stand in front of it and face North then I would be viewing it at an angle, so it's angle compared to my cube's angle would make the cube seem more of a diamond shape when applied there. I hope this is making sense. I want to enclose the entire fenced area in my cube. I've also seen

 

0199:   player $PLAYER_CHAR 0 ()in rectangle 1089.88 -223.875  1084.5 -228.5;; never used in VC or gta 3

 

Which appears to be similar to the cube opcode but without the z_angle. I've been trying different coordinates to get the desired effect but I'm not having much luck. If anybody has any advice I'm all ears. Here are a couple of pics to hopefully help show exactly what it is that I'm trying to accomplish.

>Odd Angle pic<

>Coordinate points #1 & #2<

 

For testing purposes I used this code to alert me to when I'm outside the specified cube.

 

:In_The_Cube0001: wait  250 ms  00D6: if  00256:   player $PLAYER_CHAR defined 004D: jump if false ££In_The_Cube00D6: if  08057:   NOT   player $PLAYER_CHAR  0 ()in cube 42.66533 -815.9249 15.46329 144.5022 -737.2314 -15.46329004D: jump if false ££In_The_Cube 

 

Any info or advice?

Edited by Knowledge Novice

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.