Jump to content

[question] how to place blood *updated looking*


squaredb

Recommended Posts

The below doesn't seem possible, but I have a new question, may I get some help placing blood sprites around CJ? I haven't found the model ID number to display blood on the ground.

Will you help me with a way to view the MTA:SA game code as it happens in real time?

I am a visual learner and if I could watch the game scripting run in code form, much like Neo watching the Matrix, I would learn quicker. Is this possible?

Edited by Guest
Link to comment

No. All you can do is debug MTA as it runs and have break points where application stops at this point and you can see what code gets executed and what's going to be next. I'm not going to explain to you how to debug because there is so much information on the internet on debugging that you can find it yourself easily.

Link to comment

It's not hard to make the code flow visible. You can make the script output the lines using outputDebugString or some other output function. Like this:

outputDebugString("doSomething()") 
doSomething() 
outputDebugString("doSomethingElse(argument)") 
doSomethingElse(argument) 

Making the code flow visible without modifying the script itself is harder. That requires reading the file from another script, then finding the separate statements, inserting new lines which output the information and then use loadstring to execute the resulting string as lua code.

Link to comment
It's not hard to make the code flow visible. You can make the script output the lines using outputDebugString or some other output function. Like this:
outputDebugString("doSomething()") 
doSomething() 
outputDebugString("doSomethingElse(argument)") 
doSomethingElse(argument) 

Making the code flow visible without modifying the script itself is harder. That requires reading the file from another script, then finding the separate statements, inserting new lines which output the information and then use loadstring to execute the resulting string as lua code.

Okay, you win because I like your style. Still I have the question of how to find the blood placement command code. I want to have a trail of blood pools following CJ around the map. I looked into fxAddBlood and setPedFootBloodEnabled but don't think it is what sprite texture I am looking to leave laying around the map.

I want to make the map look like bodies have been laying around everywhere, something like the ground of the zombie mod picture. Bloodpool sprites all around the map.

Link to comment
Maybe you can try shaders.

My post has gone corrupt, it should be deleted as I have never included any code. This is an ugly hack of an attemp. I can create a ped. If I kill the ped it leaves the blood pool, so if I want the bloodpool only, I should createPed, killPed, and make the corpse invisible instantly yes?

Well I can createPed, I can't yet killPed, and I am getting bummed out in even finding away to hide the corpse.

Link to comment

Stuck here, ped will spawn, but can't make it drop dead. It's the darn kill function and my lack of bool understanding.

Ideas on how run the kill function?

function createPedoForPlayer(thePlayer, command, modelid) 
    local x,y,z = getElementPosition(thePlayer)  
    y = y + 5 
    createPed(tonumber(122),x,y,z,180) 
  
    killPed(tonumber(122)) 
end 
addCommandHandler("createpedo", createPedoForPlayer) 

I had a if / then where when the createPed was true, then killPed, but could not get that working either. Thank you for the helps.

Link to comment
function createVehicleForPlayer(thePlayer, command, modelid) 
    local x,y,z = getElementPosition(thePlayer) -- get the position of the player 
    y = y + 5 -- add 5 units to the y position 
    thePed = createPed(tonumber(122),x,y,z,180) 
end 
  
addEvent("killPedoForPlayer", true) 
function killPedoForPlayer() 
    killPed(thePed) 
    outputChatBox("Hell hath cometh",thePlayer) 
end 
  
addCommandHandler("killpedo", killPedoForPlayer) 
addCommandHandler("createpedo", createVehicleForPlayer) 
  

Damn Solidsnake, I figured out a way too, but not nearly as fast as you. Slow down :twisted: Thank you again.

Link to comment
    function createPedoForPlayer ( thePlayer, command, modelid ) 
        local x, y, z = getElementPosition ( thePlayer ) 
        y = ( y + 5 ) 
        ped = createPed ( 122, x, y, z, 180 ) 
        setElementAlpha ( ped, 0 ) 
        killPed ( ped ) 
    end 
    addCommandHandler ( "createpedo", createPedoForPlayer ) 

^^^ This code is fun to play with. As I drive through MTAforums I'm going to hit the nitrous oxide that is the members . I'm coming out saying that I am making an oil slick mod. The idea starting from the SA bloodpools reminding me of the oil slick sprites from GTA 2.

So the way the script would work [in my head] is it creates the instance above behind an attached vehicle. At the same time as the "ped Death" and pooling blood/oil (I'd like to change the color to black too, but one thing at a time) an invisible toggle marker would be placed in the pools of blood/oil which modify vehicleHandling of pursuit vehicles to spin, sputter, act erratic, etc. Do you fellas have more script ideas to get the mod rolling? It's going to be chaos.

One problem I already have the ped are not made invisible instantly, there is a time lag blip where skin is visible. I have also searched for existing police stinger spike strip scripts to base off of without luck.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...