Meteor Event
#1

Hey guys, I want to create a meteor accident looks like this video. it's a rock falling down from the sky creating a explosion when the rock touchs the floor. This change the gravity, etc. How can I do this? Which function should i use?
I hope u help me, thanks :3

Video
Reply
#2

We're not script generators. Perhaps these could help

https://sampwiki.blast.hk/wiki/MoveObject

https://sampwiki.blast.hk/wiki/CreateExplosion
Reply
#3

Quote:
Originally Posted by NealPeteros
Посмотреть сообщение
I didn't ask for a complete system or the script code. I want a simple instruction, information, do you know what is this? I think not.

Anyway, thank u.
Reply
#4

I'm assuming you're referring to the videos from LS-RPs earthquake event.

Quote from the developer in 2014:

Quote:
Originally Posted by Damian
Посмотреть сообщение
pawn Код:
new AmountOfShakes[ MAX_PLAYERS ];
forward SetPlayerEarthquakeEffect   ( playerid, amount_of_shakes );
forward EarthquakeEffects           ( playerid, interval, bool:status );
public SetPlayerEarthquakeEffect( playerid, amount_of_shakes ){
    if( amount_of_shakes < AmountOfShakes[ playerid ] )
        return 0;
    AmountOfShakes[ playerid ] = amount_of_shakes;
    new vehicleid = GetPlayerVehicleID( playerid );
    if( vehicleid ){
        if( GetVehicleModelMass( vehicleid, true ) >= 2400.0 || amount_of_shakes <= SMALL_QUAKE+200 ){
            SetVehicleAngularVelocity( vehicleid, 0.09, 0.033, 0.05 );
        } else SetVehicleAngularVelocity( vehicleid, 0.03, 0.03, 0.03 );
    }
    return EarthquakeEffects( playerid, 10, false );
}
public EarthquakeEffects( playerid, interval, bool:status ){
    if( AmountOfShakes[ playerid ] <= 0 )
        return SetPlayerDrunkLevel( playerid, 0 );
    if( !(AmountOfShakes[ playerid ]%5) ){
        new vehicleid = GetPlayerVehicleID( playerid );
        if( GetVehicleModelMass( vehicleid, true ) >= 2400.0 || AmountOfShakes[ playerid ] <= SMALL_QUAKE+200 ){
            SetVehicleAngularVelocity( vehicleid, 0.03, 0.03, 0.03 );
        } else SetVehicleAngularVelocity( vehicleid, 0.015, 0.015, 0.015 );
    }
    if( status ){
        SetPlayerDrunkLevel( playerid, 3000 );
    } else SetPlayerDrunkLevel( playerid, 50000 );
    AmountOfShakes[ playerid ]--;
    return SetTimerEx( "EarthquakeEffects", interval, false, "iii", playerid, interval, !status );
}
Also have a function called forward Earthquake ( Float:x, Float:y, Float:z, Float:radius, area, amount_of_shakes ); but it's fused with so much LS-RP related code it may be useless to you. You can make the sound functions and such on your own. The rest is done through the mapping team + RemoveBuilding + Creation of objects.

Good luck hope you have as much fun as we did!
Reply
#5

Well, you could take the object id of a rock, use MoveObject to make it fall from the sky, and when it reaches to the ground, use CreateExplosion for the explosions
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)