Quantcast

Jump to content

» «
Photo

[vc] Fire guns on vehicle?

2 replies to this topic
Rainbow Party
  • Rainbow Party

  • BUSTED!
  • Joined: 16 Oct 2013

#1

Posted 23 October 2013 - 03:04 AM Edited by Rainbow Party, 23 October 2013 - 03:05 AM.

Has anyone managed to get this code working in Vice City?

0541: fire_guns_on_vehicle $2689
 

In Main.scm it's only used for the Hunter helicopter but  from what I've been reading online, it can be used on any car (with weird results). But when I tried to use it with the code below I got an unhandled exception error. I tried it on a random car, then a car for Maxo's Vehicle Loader that comes with machine guns attached to it and then on a Hydra, also for MVL, all with the same result.

thread 'CARGUN' 
:CARGUN_10
wait 0 
if and
   Player.Defined($PLAYER_CHAR)
0443:   player $PLAYER_CHAR in_a_car 
else_jump @CARGUN_10 
wait 0 
if 
00E1:   key_pressed 0 17 
else_jump @CARGUN_10 
wait 0 
00DA: 1@ = player $PLAYER_CHAR car 
0541: fire_guns_on_vehicle 1@ 
wait 0 
jump @CARGUN_10 


Jack
  • Jack

    wanted level modifications

  • Feroci
  • Joined: 06 Dec 2011
  • Colombia

#2

Posted 23 October 2013 - 06:10 AM Edited by Jack..., 23 October 2013 - 08:14 AM.

You said Hydra so you must mean San Andreas. The opcode 00DA is not working in SA. Try using 0811 instead. Also I'm not sure about SA but in VC I think that "Fire Guns" opcode works only on vehicles with guns - such as hunter, seasparrow, plane, police boat or rhino (in rhino it fires bullets instead of projectiles).

EDIT: And for VC use 03C1 instead of 00DA.

Rainbow Party
  • Rainbow Party

  • BUSTED!
  • Joined: 16 Oct 2013

#3

Posted 23 October 2013 - 12:53 PM Edited by Rainbow Party, 23 October 2013 - 05:27 PM.

Thanks! I'll try it with 03C1 and see what happens. And yes, I meant Vice City. The Hydra I mentioned is the one made for the MVL mod for Vice City, so I think it actually behaves as a Hunter. I should have just tested it by spawning the actual Hunter by code instead, or get some savegame with it unlocked since I've lost mine.

 

EDIT: Thanks, it does work with 03C1. I just wanted to see how it worked and yes, it fires under the ground. I'll see if maybe there's a way to fix that through code (although I guess someone else would have discovered it by now).

I'm interested in this because it looks like the only way to make AI cars shoot at you, but I think I'll otherwise just use the "put actor in turret" code, it's not as badass as having the car itself firing a gun but it's effective enough.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users