News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Show Posts

* Messages | Topics | Attachments

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Reath

Pages: 1 2 [3] 4
31
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 12:17:44 PM »
Did you rename one of the tl buttons? If they have the same name it won't work.  Make sure they both load. Or just add them together with and change any extra "if"s to elseif

32
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 12:07:00 PM »
Code: [Select]
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
ImportScript("2_B.lua")

  l_0_0 = 60
 
MissionSetup = function()
  local l_1_0 = 270
  local l_1_1 = -110
  local l_1_2 = 6.4000000953674
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("Nemesis")
PedSetTypeToTypeAttitude(0, 13, 1)
PedSetTypeToTypeAttitude(1, 13, 3)
PedSetTypeToTypeAttitude(2, 13, 2)
PedSetTypeToTypeAttitude(3, 13, 1)
PedSetTypeToTypeAttitude(4, 13, 2)
PedSetTypeToTypeAttitude(5, 13, 2)
PedSetTypeToTypeAttitude(6, 13, 2)
PedSetTypeToTypeAttitude(7, 13, 2)
PedSetTypeToTypeAttitude(8, 13, 2)
PedSetTypeToTypeAttitude(9, 13, 2)
PedSetTypeToTypeAttitude(10, 13, 2)
PedSetTypeToTypeAttitude(11, 13, 1)
PedSetPedToTypeAttitude(Gary, 13, 0)
PedSetPedToTypeAttitude(Gary, 1, 1)
PedSetPedToTypeAttitude(Gary, 2, 1)
PedSetPedToTypeAttitude(Gary, 3, 1)
PedSetPedToTypeAttitude(Gary, 4, 1)
PedSetPedToTypeAttitude(Gary, 5, 1)
PedSetPedToTypeAttitude(Gary, 6, 1)
PedSetPedToTypeAttitude(Gary, 7, 1)
PedSetPedToTypeAttitude(Gary, 8, 1)
PedSetPedToTypeAttitude(Gary, 9, 1)
PedSetPedToTypeAttitude(Gary, 10, 1)
PedSetPedToTypeAttitude(Gary, 11, 1)
PedSetPedToTypeAttitude(Gary, 12, 1)
end

TL_Buttons = function()
        if IsButtonPressed(2, 0) then --"and" not then if
          px,py,pz = PlayerGetPosXYZ()
        TextPrintString("Player Pos: "..px..",  "..py..",  "..pz.."Area:"..AreaGetVisible(), 4, 2)
         Wait(1000)
        elseif IsButtonPressed(14, 0) then
          PedSetActionNode(gPlayer, "/Global/G_Johnny/Cinematic/ThroatGrab", "Act/Anim/G_Johnny.act")
                 Wait(1000)
    end
end

TL_Buttons = function()
        if IsButtonPressed(1, 0) then --"and" not then if
          px,py,pz = PlayerGetPosXYZ()
        TextPrintString("Player Pos: "..px..",  "..py..",  "..pz.."Area:"..AreaGetVisible(), 4, 2)
         Wait(1000)
        elseif IsButtonPressed(15, 0) then
          PedSetActionNode(gPlayer, "/Global/Nemesis/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")
                 Wait(1000)
    end
end

main = function()
  Load("Act/Dialog.act")
  Load("Act/Debug.act")
  F_TableInit()
  CreateThread("TL_Buttons")
  gMissionRunning = true
  while gMissionRunning do
    UpdateTextQueue()
    TL_Buttons()
      Wait(0)
   end
end

--[[
main = function()
repeat
TL_Buttons()  --just put everything you want to repeat in your TL_Buttons function
Wait(0)
until not Alive

   end
 
   MissionCleanup = function()
  EnablePOI()
  gMissionRunning = false
end
--]]
Don't name two functions with the same name. I fixed some of it up for you and commented out the extra main.

33
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 12:02:26 PM »
The button dosnt work all of a sudden. What button is 2,0? and 1,0?

And what buttons are 14,0 and 15,0?
14 should be look back.
15? Crouch I guess.

3 should be zoom out.
2 should be zoom in.
1 should be the right arrow, the one you use for checking what missions there are.
0 should be the left one, for checking classes.

34
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 11:45:09 AM »
It should work.

35
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 11:43:14 AM »
Well, if the node is loading the .act, and you have the right LoadAnimation, I don't know.
I know it works for me, the only difference being johnny spawns and with his boss style, which might load whatever animation you need into the game.

@Lemon
I didn't notice the 1.. What is that for anyways? Controller?

36
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 11:34:00 AM »
That usually happens if the animation for it hasn't loaded. You had LoadAnimationGroup("G_Johnny"). So I don't know.

Ah! I see.
PedSetActionNode(gPlayer, "/Global/G_Johnny/Cinematic/ThroatGrab", "Act/Anim/G_Johnny")
Maybe you just forgot to put .act where you load the node.
Try this
PedSetActionNode(gPlayer, "/Global/G_Johnny/Cinematic/ThroatGrab", "Act/Anim/G_Johnny.act")

37
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 11:20:29 AM »
This IsButtonBeingPressed(14,0) is the look behind one.

And just replace "IsButtonPressed(2, 1) and IsButtonPressed(2, 1)" with IsButtonBeingPressed(2,0)

38
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 11:09:10 AM »
How about this?
Code: [Select]
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
ImportScript("2_B.lua")

  l_0_0 = 60
 
MissionSetup = function()
  local l_1_0 = 270
  local l_1_1 = -110
  local l_1_2 = 6.4000000953674
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
  LoadAnimationGroup("G_Johnny")
PedSetTypeToTypeAttitude(0, 13, 1)
PedSetTypeToTypeAttitude(1, 13, 3)
PedSetTypeToTypeAttitude(2, 13, 2)
PedSetTypeToTypeAttitude(3, 13, 1)
PedSetTypeToTypeAttitude(4, 13, 2)
PedSetTypeToTypeAttitude(5, 13, 2)
PedSetTypeToTypeAttitude(6, 13, 2)
PedSetTypeToTypeAttitude(7, 13, 2)
PedSetTypeToTypeAttitude(8, 13, 2)
PedSetTypeToTypeAttitude(9, 13, 2)
PedSetTypeToTypeAttitude(10, 13, 2)
PedSetTypeToTypeAttitude(11, 13, 1)
end

TL_Buttons = function()
        if IsButtonPressed(2, 1) and IsButtonPressed(2, 1) then --"and" not then if
          px,py,pz = PlayerGetPosXYZ()
        TextPrintString("Player Pos: "..px..",  "..py..",  "..pz.."Area:"..AreaGetVisible(), 4, 2)
         Wait(1000)
        elseif IsButtonPressed(7, 0) and IsButtonPressed(2, 1) then
          PedSetActionNode(gPlayer, "/Global/G_Johnny/Cinematic/ThroatGrab", "Act/Anim/G_Johnny")
                 Wait(1000)
    end
end

main = function()
  Load("Act/Dialog.act")
  Load("Act/Debug.act")
  F_TableInit()
  CreateThread("TL_Buttons")
  gMissionRunning = true
  while gMissionRunning do
    UpdateTextQueue()
    TL_Buttons()
      Wait(0)
   end
end

main = function()
repeat
TL_Buttons()  --just put everything you want to repeat in your TL_Buttons function
Wait(0)
until not Alive

   end
 
   MissionCleanup = function()
  EnablePOI()
  gMissionRunning = false
end
You can put -code] before your script and -/code] after it, so it won't be messy. Replace the dash with [

39
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 27, 2014, 10:39:00 AM »
Try " if IsButtonPressed(2, 1) then " (zoom in)
and " elseif IsButtonPressed(14, 0) then "  (look back)

40
Modding Questions/Help Archives / Re: How do Action Nodes Work?
« on: March 26, 2014, 10:38:07 PM »
Did you put the "end" between those two waits? You need to end the "if" before you get to the "until".
Code: [Select]
main = function()
repeat
 if IsButtonPressed(15, 1) and IsButtonPressed(2, 1) then
          px,py,pz = PlayerGetPosXYZ()
        TextPrintString("Player Pos: "..px..",  "..py..",  "..pz.."Area:"..AreaGetVisible(), 4, 2)
         Wait(1000)
        elseif IsButtonPressed(7, 0) and IsButtonPressed(12, 0) then
          PedSetActionNode(gPlayer, "/ThroatGrab/ThroatGrab_Gv", "Act/g_johnny")
 Wait(1000)
end 
Wait(0)
until not Alive
 end

41
TUTORIALS / Triggering speech and setting Stats through Lua
« on: March 25, 2014, 10:33:12 PM »
Code: [Select]
PedSetStatsType(PED,"STAT_J_DAMON")
To make a ped use a certain pedstat.

GameSetPedStat(PED, 5, 300)
I would use override, to make sure it will work and override anything else.

PedOverrideStat(PED, 5, 700)
           PED, STAT, VALUE

0 Id of pickup def (c. Pickups.dat) - Item to drop when defeated - FRAFFYCAN - Weapons or other items - PedOverrideStat(PED, 0, "W_DeadRat")
1 Likelihood (n/100) of dropping an item when defeated
2 Vision Yaw (in degrees)  note this is total yaw and not angle from facing direction (which is this value / 2) Vision Rate
3 Vision Range (in meters)
4 Max Health
5 Health regeneration rate - percentage of maximum rate - Set to 101 or higher for regeneration.
6 Fear (n/100) How likely to run away from a fight or insult or weapon fired
7 Chicken (n/100) (chance of tattling/ yelling for help)
8 Attack Frequency - How often they attack
9 Bike Attack Frequency - How often they attack on a bike
10 Projectile Attack Accuracy (n/100) How accurate a ped is with a weapon
11 Projectile Attack Frequency - How often they attack with a weapon
12 Block Frequency - How often they block
13 Evade Frequency - How often they evade, preps dodge and dodge projectiles?
14 Aggression (n/100) How likely to start a fight, or continue a fight.
15 Criminality - How likely to bully or smash things
16 Sprint Meter - How much they can run before out of breath. 60 is normal
17 Character Class - Generic - Ranged - Striker - Melee - Grappler
18 Preferred Combat Zone (0/1/2 = short/medium/long) Short is grappling? Medium is striker? Long should be for Ranged
19 Preferred Orientation (Bit field: 0001 front, 0010 side, 0100 back. So front+side = 011 = 3, and 111 = 7) Not sure
20 Animation Speed factor (100 = 100% speed) 200 = Double speed - 50 is half speed
21 Zone Promote No idea
22 Special Meter  No idea
23 Special Points No idea
24 Bike Cruise Speed - Normal riding? Cruise control bike?
25 Bike Top Speed - Top possible speed
26 Bike Wait Speed - Waiting for you to catchup?
27 Bike Flee Distance - Fleeing distance from enemy
28 Bike Catchup Distance - Distance to catchup
29 Bike Wait Distance - How far away to wait.
30 Bike Projectile Usage (n/100) - How often to use weapons on bikes
31 Damage_Scale - How much damage per hit. 100 Should be normal. 500 will be very deadly with weapons
32 Dive probability No idea
33 Tenacity (n/100), How tough they are to knock down or off a bike
34 Evasion (n/100) - Bike evasion?
35 Bike Flee Speed - How fast to flee
36 Bike Follow Speed - How fast to follow
37 Bike Catchup Speed - How fast to catchup
38 Grap1Reversal (Strikes) - How likely to be able to hit/Knee drop - 100 max Impossible to hit
39 Grap2Reversal (Grapples) - How hard to grapple - 100 max Impossible to grapple
40 Night weapon - Weapon to use at night - W_Flashlight   PedOverrideStat(PED, 40, "W_Flashlight")
41 "Name of the bike model which the ped can ride (""""None"""" if the ped can't ride any bike)" - Bike - crapbmx - banbike - racer - aquabike - oladbike
42 "Name of the bike model which the ped can ride (""""None"""" if the ped can't ride any bike)"           scooter might work, I haven't checked
43 "Name of the bike model which the ped can ride (""""None"""" if the ped can't ride any bike)"
44 Likelihood (n/100) of having a weapon
45 Weapon slot 1: Type of melee/projectile ---  PedOverrideStat(PED, 45, "spudg")
46 Weapon slot 1: Amount of Ammo    -1 (Negative one) should be infinite. Otherwise will only have what number you set
47  Weapon slot 1: Selection weight for melee/projectile weapon - HIGHEST NUMBER WINS
48 "Weapon slot 1: Available after mission (use ""init"" to signify start of game)"    -    e.g - 1_03 or 4_01
49 Weapon slot 2: Type of melee/projectile         - brocketlauncher - spudg
50 Weapon slot 2: Amount of Ammo
51 Weapon slot 2: Selection weight for melee/projectile weapon
52 "Weapon slot 2: Available after mission (use ""init"" to signify start of game)"
53 Weapon slot 3: Type of melee/projectile
54 Weapon slot 3: Amount of Ammo
55 Weapon slot 3: Selection weight for melee/projectile weapon
56 "Weapon slot 3: Available after mission (use ""init"" to signify start of game)"
57 Weapon slot 4: Type of melee/projectile
58 Weapon slot 4: Amount of Ammo
59 Weapon slot 4: Selection weight for melee/projectile weapon
60 "Weapon slot 4: Available after mission (use ""init"" to signify start of game)"
61 Stun Resistance (n/100) how resistant a ped is to stunning - Like from uppercut
62 "Ped can be knocked down (0 = no, 1 = yes)"
63 Percent health at which the ped can be humiliated in combat. 0 - 100



I'll add anymore I get to work.
Code: [Select]
SoundPlayScriptedSpeechEvent(TargetPed, "JEER", 0, "large")
--Ped to speak - Speech type to play - Leave as 0 unless for mission audio - Ped size?

--Mission audio example
SoundPlayScriptedSpeechEvent(TargetPed, "M_2_R11", 10, "large", true)
--Put the ID for the mission, and the number is for which line to use.

--Speech types
BUSTING
BUSTING_JIMMY
BYE
CALL_FOR_HELP
CHASE
CHASE_ESCAPE
CHASE_OUT_OF_BREATH
CHATTER
COMPLAIN
CONFUSED
CONGRATULATIONS
DEFEAT_TEAM
DISGUST
DONT_HIT
FIGHT
FIGHT_BEATEN
FIGHT_INITIATE
FIGHT_SACKED
FIGHT_WATCH
FIGHT_WTF
FLUSTERED
GIVE
GREET
GREET_PLAYER_HAIRCUT_LIKE
GREET_PLAYER_SHIRT_LIKE
JEER
LAUGH
PUKE
RAT_HIT
SCARED
SEE_ALLY_ATTACKED
SEE_SOMETHING_COOL
SEE_VANDALISM
SNOW_SHOVELLING
STINK_BOMB
STORE_BYE_BUY
STORE_BYE_NOBUY
STORE_VIOLENCE_RESPONSE
TAUNT
TAUNT_AGGRO
TAUNT_BACK_DOWN
TAUNT_HARASS
TAUNT_KICK
TAUNT_NEIGHBOURHOOD_DROPOUT
TAUNT_NEIGHBOURHOOD_GREASER
TAUNT_NEIGHBOURHOOD_PREP
TAUNT_NEW_KID
TAUNT_PLAYER_DISLIKE_CLOTHES
TAUNT_PLAYER_DISLIKE_HAIR
TAUNT_PLAYER_DISLIKE_HAT
TAUNT_PLAYER_DISLIKE_PANTS
TAUNT_PLAYER_DISLIKE_SHIRT
TAUNT_PLAYER_DISLIKE_SHOES
TAUNT_PLAYER_DISLIKE_TATTOO
TAUNT_PLAYER_EGGS
TAUNT_PLAYER_FALLEN
TAUNT_PLAYER_LIKES_CLOTHES
TAUNT_RESPONSE
TAUNT_RESPONSE_CRY
TAUNT_RESPONSE_DONT_CARE
TAUNT_RESPONSE_PLEAD
THANK_YOU
THANKS_JIMMY
THIS_WAY
TRASH_TALK_PERSONAL
TRASH_TALK_TEAM
VICTORY_INDIVIDUAL
VICTORY_TEAM
WAIT_FOR_ME
WARNING_CURFEW
WARNING_TRUANCY
WHINE

-----------------------------------------------
Player audio

SoundPlayScriptedSpeechEvent(gPlayer, "PLAYER_BIKE_STEALING", 0, "large")

PLAYER_BEATEN
PLAYER_BIKE_CRASH
PLAYER_BIKE_STEALING
PLAYER_BIKE_STOLEN
PLAYER_BOOT
PLAYER_CAMERA_BAD
PLAYER_CAMERA_GOOD
PLAYER_DEFEAT_INDIVIDUAL
PLAYER_DEFEAT_TEAM
PLAYER_DEJECTED
PLAYER_DRINK
PLAYER_EXCUSE
PLAYER_FLIRT_GOOD
PLAYER_GET_MONEY
PLAYER_GET_WEAPON
PLAYER_GREET_ASSIST
PLAYER_GREET_FRIENDLY_DOG
PLAYER_GREET_GENERIC
PLAYER_GREET_GENERIC_BOY
PLAYER_HIT_SWITCH
PLAYER_IDLE
PLAYER_IDLE_RAIN
PLAYER_IDLE_TIRED
PLAYER_IDLE_WINTER
PLAYER_INFIRMARY
PLAYER_JEER
PLAYER_LAUGH_CRUEL
PLAYER_MISSION_SUCCESS
PLAYER_OFFICE
PLAYER_STEALTH
PLAYER_SUCCESS
PLAYER_TAG_COMPLETE
PLAYER_TAUNT
PLAYER_TAUNT_AUTHORITY
PLAYER_TAUNT_BURN
PLAYER_TAUNT_COMBAT
PLAYER_TAUNT_COMBAT_SHOVE
PLAYER_TAUNT_CONTINUED
PLAYER_TAUNT_DOG
PLAYER_TAUNT_DROPOUT
PLAYER_TAUNT_FACTION
PLAYER_TAUNT_FLEE
PLAYER_TAUNT_FLIRT_INSULT
PLAYER_TAUNT_GIRL
PLAYER_TAUNT_GREASER
PLAYER_TAUNT_HARASS
PLAYER_TAUNT_HARASS_FEMALE
PLAYER_TAUNT_HARASS_MALE
PLAYER_TAUNT_HUMILIATE
PLAYER_TAUNT_HUMILIATE_HIT
PLAYER_TAUNT_JOCK
PLAYER_TAUNT_KO
PLAYER_TAUNT_NERD
PLAYER_TAUNT_PREP
PLAYER_TAUNT_VICTIM
PLAYER_TIRED
PLAYER_TOILET_DUNK
PLAYER_TRASH_TALK
PLAYER_VICTORY_INDIVIDUAL
PLAYER_VICTORY_TEAM
PLAYER_WHEE

Narration audio. Lemon found these.
Code: [Select]
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 101, "speech") <-- So here I am in probably the worst school in the country
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 102, "speech") <-- Whos alump nye are..
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 103, "speech") <-- and that old creep thinks he can tame me?
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 104, "speech") <-- We shall see my friend... I only give people..
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 105, "speech") <-- with russell passified...
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 106, "speech") <-- This place is a Rotton Onion
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 107, "speech") <-- Peel off one stinkin layer.. and theres a...
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 108, "speech") <-- Now darby is stupid, melevalent, and rich.
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 109, "speech") <-- Which wouldn't surprise you in a furture life.. he will end up in congress
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 110, "speech") <-- But this is my story.. not his
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 111, "speech") <-- With the rich kids under control its time to turn my attention to there sworn enemies...
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 112, "speech") <-- Im starting to feel pretty good about myself
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 113, "speech") <--Ive taken control of two of the schools worst cliques.. but I know there are other..
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 114, "speech") <-- Problems with over developed tutuory glens... and brains the size of peas
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 115, "speech") <-- So... here I am suddenly king of the School
SoundPlayScriptedSpeechEvent(gPlayer, "NARRATION", 116, "speech") <-- I never wanted things to turn out this way.. just wanted to control couple of..

42
Bully Modding Archives / Triggering speech
« on: March 24, 2014, 08:27:41 PM »
Since I couldn't find anything on "SoundPlayScriptedSpeechEvent", I thought I'd go ahead and post what I found, hopefully someone will find this useful.

Code: [Select]
SoundPlayScriptedSpeechEvent(TargetPed, "JEER", 0, "large")
--Ped to speak - Speech type to play - Don't know, leave as 0 - Ped size?

--Speech types that I got to work
BYE
CALL_FOR_HELP
CHASE
CHASE_ESCAPE
CHASE_OUT_OF_BREATH
CHATTER
COMPLAIN
CONFUSED
CONGRATULATIONS
DEFEAT_TEAM
DISGUST
DONT_HIT
FIGHT
FIGHT_BEATEN
FIGHT_INITIATE
FIGHT_SACKED
FIGHT_WATCH
FIGHT_WTF
GIVE
GREET
JEER
LAUGH
PUKE
RAT_HIT
SCARED
SEE_ALLY_ATTACKED
SEE_SOMETHING_COOL
STINK_BOMB
TAUNT
THANK_YOU
THANKS_JIMMY
THIS_WAY
VICTORY_INDIVIDUAL
VICTORY_TEAM
WHINE

I'm sure there are better ways, but this is all I could find.

43
LUA Scripting Help / Re: Player faction and TextPrintString
« on: March 23, 2014, 09:17:23 PM »
Ok, thanks, maybe someone else knows, or I'll figure it out eventually.

44
LUA Scripting Help / Re: Player faction and TextPrintString
« on: March 23, 2014, 10:49:34 AM »
Players faction is 13 ,but it doesn't work by itself.. I think the Players Faction includes flags for prop/ped interactions.
Ah, ok. How would I set the flags? PedSetFlag?

45
LUA Scripting Help / Player faction and TextPrintString
« on: March 22, 2014, 11:11:57 AM »
PedSetFaction is glitchy, how do I set the player back to the player faction? Or what other ways are there to set the player's faction and to allow them to open doors.

Is there any way to do other color text? Like the text in missions or chapter intros.

Pages: 1 2 [3] 4