Quantcast

Jump to content

» «
Photo

Faster Missiles

15 replies to this topic
yair1221
  • yair1221

    Homie

  • Members
  • Joined: 18 Feb 2010

#1

Posted 06 August 2010 - 09:54 AM

Is there a way to change the missiles speed?
Because the rocket launcher is to slow to be fired from a car,When im driving too fast the missiles explodes immediately on the car
Maybe something in weapons.dat?

toonskull
  • toonskull

    Necromancer

  • Members
  • Joined: 04 Aug 2009

#2

Posted 06 August 2010 - 12:52 PM

There is a variable in the weapons.dat that makes guns instant and ranged weapons like missiles take time.

Adler
  • Adler

    Hello, Smith. ( -`)ノ

  • Leone Family Mafia
  • Joined: 25 Jul 2009
  • None

#3

Posted 06 August 2010 - 04:47 PM

Missiles are hard coded. You'd have to do some memory hacking to make missiles go faster. Use ryosuke's missile script for reference. All his sources are here. icon14.gif

Or maybe since heat seeking missiles seem to go faster when it's locked on to a plane or helicopter then you could get a handle on the car you're targeting and create a fake plane there. smile.gif

yair1221
  • yair1221

    Homie

  • Members
  • Joined: 18 Feb 2010

#4

Posted 06 August 2010 - 05:00 PM

no,im trying a non-lock missile
and i want it to fire at a certain location,not at a fake plane because sometimes i pass the missile with my car,and the HS missile fires at my own car

Adler
  • Adler

    Hello, Smith. ( -`)ノ

  • Leone Family Mafia
  • Joined: 25 Jul 2009
  • None

#5

Posted 07 August 2010 - 06:25 AM

Hmmm check out Ryosuke's RPG script. It disable's the player's ability to use the rocket launcher and replaces the rocket that's fired with it's own object.

yair1221
  • yair1221

    Homie

  • Members
  • Joined: 18 Feb 2010

#6

Posted 07 August 2010 - 08:52 AM

no, no good
but there might be another way,
if i create an explosion, is it just a particle? or cars will realy be destroyed?

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci
  • Joined: 24 Dec 2007
  • None
  • Contribution Award [Mods]

#7

Posted 07 August 2010 - 09:13 AM

Depends what opcode you're using...

yair1221
  • yair1221

    Homie

  • Members
  • Joined: 18 Feb 2010

#8

Posted 07 August 2010 - 09:43 AM Edited by yair1221, 07 August 2010 - 09:45 AM.

you know...
064B: 62@ = create_particle "PUKE" at 90@ 91@ 92@ type 1
and then to make it visible

by the way, a different question:
CODE

0107: 19@ = create_object #SPL_B_MAB_M at 0.0 0.0 0.0
0681: attach_object 19@ to_car 0@ with_offset 0.0 3.2 -0.5 rotation 90.0 180.0 0.0
0382: set_object 19@ collision_detection 1


why the object keeps moving through things instead of crashing into them?

Adler
  • Adler

    Hello, Smith. ( -`)ノ

  • Leone Family Mafia
  • Joined: 25 Jul 2009
  • None

#9

Posted 07 August 2010 - 06:04 PM

QUOTE (yair1221 @ Aug 7 2010, 00:52)
no, no good
but there might be another way,
if i create an explosion, is it just a particle? or cars will realy be destroyed?

Why is it no good? And creating an explosion will damage cars and peds the same as if you fired an RPG at them.

QUOTE (yair1221 @ Aug 7 2010, 01:43)
why the object keeps moving through things instead of crashing into them?

Only certain objects have collision. You have to attach that object to something like BBALL_COL and put scripted_collision check on the BBALL_COL object. I think there's a list of all of them somewhere but I can't find it. confused.gif

yair1221
  • yair1221

    Homie

  • Members
  • Joined: 18 Feb 2010

#10

Posted 07 August 2010 - 09:58 PM

QUOTE (Adler @ Aug 7 2010, 18:04)
QUOTE (yair1221 @ Aug 7 2010, 00:52)
no, no good
but there might be another way,
if i create an explosion, is it just a particle? or cars will realy be destroyed?

Why is it no good? And creating an explosion will damage cars and peds the same as if you fired an RPG at them.

QUOTE (yair1221 @ Aug 7 2010, 01:43)
why the object keeps moving through things instead of crashing into them?

Only certain objects have collision. You have to attach that object to something like BBALL_COL and put scripted_collision check on the BBALL_COL object. I think there's a list of all of them somewhere but I can't find it. confused.gif

because i need to want to use the original RPG

and about the explosion, it never works, the explosion never shows up, thats a usual script

CODE

...
:1
wait 0
if and
actor.drivingvehicletype(#PETRO)
0AB0:  key_pressed 96
jf @1
0407: store_coords_to 2@ 3@ 4@ from_car 0@ with_offset 0.0 -6.5 0.2
064B: 5@ = create_particle "explosion_large" at 2@ 3@ 4@ type 1
wait 2000
064C: make_particle 5@ visible

still...nothing

and for the object collision,what if the object is not in the size of the object im using?

Adler
  • Adler

    Hello, Smith. ( -`)ノ

  • Leone Family Mafia
  • Joined: 25 Jul 2009
  • None

#11

Posted 07 August 2010 - 10:36 PM

Hmm you can still equip the rocket launcher but you just disable the game's way of making it fire (since the rocket is too slow) and you replace it with a rocket of your own so you can manipulate it's speed. I guess I explained it wrong at first. blush.gif

Instead of creating an explosion particle use this instead:
CODE
0948: create_explosion_at 2@ 3@ 4@ type 11 camera_shake 5.0

Check out ryosuke's list of explosion IDs for the type.

The size of the object collision doesn't matter. I used BBALL_COL with my burst missile mod and it worked fine. wink.gif

wesley123
  • wesley123

    Prankster

  • Members
  • Joined: 23 Mar 2008

#12

Posted 07 August 2010 - 10:37 PM

is that the full script? If so, 0@ is nowhere defined.

Also, it might be possible is that you are in the explosion and thus cannot see it, might be an idea to create the effect in front of you?

yair1221
  • yair1221

    Homie

  • Members
  • Joined: 18 Feb 2010

#13

Posted 07 August 2010 - 11:25 PM

QUOTE
  is that the full script? If so, 0@ is nowhere defined.


no it isnt, 03C0: comes before it, defining 0@

QUOTE
Also, it might be possible is that you are in the explosion and thus cannot see it, might be an idea to create the effect in front of you?


no, the explosion should be behind me, im driving forward in a car and im looking behind, but there is no explosion, and the car that should be in the explosion isnt damaged

BnB
  • BnB

    The Yardies

  • Members
  • Joined: 28 Jun 2010
  • Saint-Vincent-and-the-Grenadines

#14

Posted 08 August 2010 - 08:42 AM

CODE
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset 0.0 -6.5 0.2

0.0 = x offset
-6.5 = y offset
0.2 = z offset
That means that the explosion will be in the EAST of your car.
You should do it as zaz do it in his Missle mod

yair1221
  • yair1221

    Homie

  • Members
  • Joined: 18 Feb 2010

#15

Posted 08 August 2010 - 09:18 AM Edited by yair1221, 08 August 2010 - 10:48 AM.

about the colission detection again:
i cant make the object destroy normally
only with a certain opcode
i edited it in object.dat and made it gun breakable
i also made it destructible in the script
i gave it 200 health
but when i shoot it with minigun, m4's, rpg's and what else
it doesnt destroy

yeah but i dont need the mod,
i made it just a little to the right and it worked
i tried putting it back and it didnt

BTW:
what you said isnt to the east of my car
its on 0.0 so it would have been in the middle
anyway thanks for the help
and 0.1 to the right doesnt really matters

343 guilty spark
  • 343 guilty spark

    Player Hater

  • Members
  • Joined: 26 Nov 2013

#16

Posted 28 November 2013 - 08:16 PM Edited by 343 guilty spark, 28 November 2013 - 08:19 PM.

i Kno this Thread is DEAD, But just in case someone reads it i want it to be solved.

here is a cleo scrip by me to make missiles go faster!

 

they are fast and dumber, they can miss if you are aiming too far away from the target that you locked on

 

{$CLEO .cs}
wait 0
while true
    wait 0
    //0xB7449C pool
    //0x19C    element size
    //1@ first object
    //2@ max objects
    0A8D: 1@ = read_memory 0xB7449C size 4 virtual_protect 0
    1@ += 8
    0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
    1@ -= 8
    0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
    2@ -= 1
    for 3@ = 0 to 2@ // step 1
        0AEC: 4@ = object_struct 1@ handle
        if
        03CA:   object 4@ exists
        then
            if
                09CC:   object 4@ model_is #MISSILE
            then
               059F: get_object 4@ velocity_in_direction 10@ 11@ 12@
               14@ = 0.0
               13@ = 1.0
               006B: 13@ *= 10@ // (float)
               006B: 13@ *= 10@ // (float)
               005B: 14@ += 13@ // (float)
               13@ = 1.0
               006B: 13@ *= 11@ // (float)
               006B: 13@ *= 11@ // (float)
               005B: 14@ += 13@ // (float)
               13@ = 1.0
               006B: 13@ *= 12@ // (float)
               006B: 13@ *= 12@ // (float)
               005B: 14@ += 13@ // (float)
               if
                   14@ < 5000.0 // 5000.0 is MaxSpeed^2
               then
                   10@ *= 2.0
                   11@ *= 2.0
                   12@ *= 2.0
                   Object.Throw(4@ , 10@, 11@, 12@);  // freeze! Slow sh*t!
               end
            end
        end
        1@ += 0x19C
    end // for
end





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users