New topics to this forum are subject to moderation, and will not appear immediately. Pending approval by a moderator, if a topic is deemed unsuitable it will be deleted without notification.
GTAGarage.com free mod hosting from GTANet, simply login with your GTAForums account details
Kernlochbohrer Group: Members
Joined: Jan 10, 2005
QUOTE (Fatalpipe @ Mar 12 2011, 22:13)
I deleted the time check and carrec,just did things from car_drive_tutorial.Tried the match coding thing creating a variable "25@= coords XYX values " ,then check if "25@== my desired XYZ coords values",but doesnt work.
post your script
QUOTE
You know any way to check weather conditions?Eg.: If current weather is cloudy SF?
And I dont understand the "IGNORE UNKNOW" option on SannyBuilder/Debug Options. I got some error messages when I was looking inside other finished scripts and this option was unchecked,but my point is: If the opcode is unknow,how people put this in script without making any idea of what this opcode does/means?
don't know i have my hook allways only at constant indexes decompiled scripts can have unsued opcodes and unknown opcodes as well as failcode because of invalid decompilation they can be modified after compilation with hexeditor sanny supoorts highlevel syntax but the recompilation translate the code in the classic gta scm code sanny supports also hexcode
Again with the rare car script.Last one I did with two peds,and needed to check if one ped is close to another to get them to walk to destination. But now,with only one ped inside car,isn't working.The driver exits the car and do nothing,stay there and the thread is not ending...I've tried a lot of conditions checks to make the driver walk,but none of them worked.
:RICHMAN_11 0001: wait 1000 ms 07D0: 5@ = weekday 00BF: 6@ = current_time_hours, 7@ = current_time_minutes 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @RICHMAN_452 00D6: if and 0039: 5@ == 2 0039: 6@ == 6 0039: 7@ == 20 004D: jump_if_false @RICHMAN_452 0247: load_model #INFERNUS 0247: load_model #HMORI
:RICHMAN_105 0001: wait 0 ms 00D6: if and 0248: model #INFERNUS available 0248: model #HMORI available 004D: jump_if_false @RICHMAN_105 009A: 2@ = create_actor_pedtype 24 model #HMORI at 645.902 -1117.5109 44.207 0173: set_actor 2@ Z_angle_to 90.0 00A5: 1@ = create_car #INFERNUS at 636.3992 -1122.2133 44.6699 0175: set_car 1@ Z_angle_to 40.0 0186: 4@ = create_marker_above_car 1@ 0187: 11@ = create_marker_above_actor 2@ 07E0: set_marker 4@ type_to 2 07E0: set_marker 11@ type_to 3 0249: release_model #INFERNUS 0249: release_model #HMORI
:RICHMAN_286 0001: wait 0 ms 00D6: if and 0256: player $PLAYER_CHAR defined 8119: NOT car 1@ wrecked 8118: NOT actor 2@ dead 004D: jump_if_false @RICHMAN_452 0615: define_action_sequences 8@ 05CB: AS_actor 2@ enter_car 1@ as_driver 10000 ms 05D1: AS_actor -1 drive_car 1@ to 627.5103 -1112.3221 46.3197 speed 10.0 0 0 5 05D1: AS_actor -1 drive_car 1@ to 1238.5304 -1575.3459 12.928 speed 25.0 0 0 5 05CD: AS_actor -1 exit_car 1@ 0616: define_action_sequences_end 8@ 0618: assign_actor 2@ to_action_sequences 8@ 061B: remove_references_to_AS_pack 8@ 004D: jump_if_false @RICHMAN_286
:RICHMAN_287 0001: wait 0 ms 00D6: if and 8119: NOT car 1@ wrecked 8118: NOT actor 2@ dead 01AE: car 1@ sphere 0 near_point 1238.5304 -1575.3459 radius 3.0 3.0 stopped 0206: actor 2@ near_car 1@ radius 5.0 5.0 3.0 flag 0 on_foot 004D: jump_if_false @RICHMAN_452 07CD: AS_actor 2@ walk_to 1217.1807 -1584.7091 13.5531 stop_with_angle 40.0 within_radius 1.0 07A1: set_walk_speed 4 034F: destroy_actor_with_fade 3@ // The actor fades away like a ghost 004D: jump_if_false @RICHMAN_287
:RICHMAN_363 0001: wait 30000 ms 00D6: if and 8119: NOT car 1@ wrecked 8118: NOT actor 2@ dead 004D: jump_if_false @RICHMAN_452 01C3: remove_references_to_car 1@ // Like turning a car into any random car 01C2: remove_references_to_actor 2@ // Like turning an actor into a random pedestrian 0164: disable_marker 4@ 0164: disable_marker 11@
I know how to spawn a object but i want pick it (like CJ raise the TV)
Can you make a script to Spawn a Beachball and pick it ? i want target the object (like target the Peds') object targetable and i want kick the object (like soccer) yes... i want to move the object when i point the object with a weapon and shot! (and when i point the ball without weapons to kick it)
can you help me? or can you make a mod to release it?
Kernlochbohrer Group: Members
Joined: Jan 10, 2005
Interactive MENUE
I can't explain everything, there are a lot of codes depending to the menue and you can do it with different methods.
The essential codes:
1. opcode 08D4: defines the menue with a var handle, with title entry, x/y-positions entries, width, amount of tables, if interactiv or not, with or without background, alignment
ignore at moment the parameters of amount of tables, if interactiv or not, with or without background, alignment and use just the values of the example above
2. opcode 08DB: adds the true content to the menue
column 0 is the first table, use this also like in example above at header string parameter is it possible to show one more title or a description then there are 12 string parameter to insert gxt entries, these are the names for the buttons
Important: all parameters must have an entry, also the gxt entries for the names of the buttons
If you wanna use only 3 buttons, then insert "dummy" in all other string parameter
then the buttons will not be shown same for the header (also if wrong gxt entries are inserted, the buttons will not be shown)
Important: the function to skip from button to button, later ingame, is working automatically with the keys UP/DOWN as well with W/S and also G/H But nothing else To let something happen, when a button is selected needs to press another key to confirm the selection and this requires to script a keypress-check therefor we need the button ID
3. opcode 08D7: submits the button number of selected button into a variable
CODE
08D7: 2@ = panel 1@ active_row
4.The menue must be removed with opcode 08DA: before the user continues playing or before another menue should be shown.
CODE
08DA: remove_panel 1@
If it happens because of any reason, that 2 interactiv menues should be shown, will you get a heavy bug and needs to terminate the game to fix that bug.
Loop 2 , while menue is shown including every neccesary checks
08DA: remove_panel 1@ back to Loop 1
To let something happen, when a button is selected needs to press another key to confirm the selection So we need a keypress-check and if the keypress-check is passed, it should get the button ID then you have a variable and it's value must be checked to select into several scriptparts, each what you wanna do Example below let you set the weather
:MenueTempW_1 wait 0 if 0256: player $PLAYER_CHAR defined jf @MenueTempW_21 if 00E1: key_pressed 0 15//--- key = Enter/Exit jf @MenueTempW_2 jump @MenueTempW_21//--jump to menue exit
:MenueTempW_2 if 00E1: key_pressed 0 16//--- key = Ped SPRINT jf @MenueTempW_1 03E6: remove_text_box 08D7: 2@ = panel 1@ active_row//-- submit number of the highlighted button into variable if 0039: 2@ == 0 // integer values jf @MenueTempW_3 01B6: set_weather 1// = SUNNY_LA jump @MenueTempW_1
while true wait 0 if 0256: player $PLAYER_CHAR defined then if L_PANEL_IS_SHOWN_VAR == 0 then if and 00E1: key_pressed 0 9//--- key = GROUP_CONTROL_BWD 80DF: not actor $PLAYER_ACTOR driving then gosub @MENU_1 end else// if menue is shown, if L_PANEL_IS_SHOWN_VAR == 1 if 00E1: key_pressed 0 16//--- key = Ped SPRINT then gosub @Selection_1 end if 00E1: key_pressed 0 15//--- key = Enter/Exit then gosub @Remove_panel end end else//if player dies or gets arrested if L_PANEL_IS_SHOWN_VAR == 1 then gosub @Remove_panel//if player dies or gets arrested while meue is shown end end end
the meaning: <opcode> <description> <jumpvariable> <description> <total-amount-of-jumpinstructions> <description> <jumpinstruction to exit if the value of the variable not exist in the jumptable> <7 x jumpinstruction>
again, let's remove the opcode and description
1. parameter
2. parameter
3.+4.parameter
5.-14.parameter
jumpvariable
total-amount-of-jumpinstructions
jumpinstruction to exit if the value of the variable not exist in the jumptable
7 x jumpinstruction
total-amount-of-jumpinstructions: the table of opcode 0871: can have max 7 jumps the table of opcode 0872: can have max 9 jumps
the exit-jumpinstruction(3.+4.parameter) don't counts for the total-amount-of-jumpinstructions
adding more lines of opcode 0872: to the opcode 0871:-line can increase the total-amount-of-jumpinstructions max. 75 jumps
a jumpinstruction have 2 parameter 0 @JPTABL_T01 first the value which must be equal with the value of the jumpvariable to allocate the jump adress second the allocated jump adress if the value infront is equal to the jumpvariable
Examplescript below: change the weather by keypress SHIFT the variable 1@ decides where the code should jump to 1@ will be changed at the end of the table by adding 1 if 1@ is bigger than 6 then it jumps to the <"jumpinstruction to exit if the value of the variable not exist in the jumptable">, to @JPTABL_T00
:JPTABL_T00// here goes the code if the value of the variable not exist in the jumptable 00BA: text_styled 'fem_off' 1000 ms 4 wait 1000 0002: jump @JPTABL_1
:JPTABL_T01 01B6: set_weather 0// = Extra Sunny LA 0002: jump @JPTABL_EXIT
:JPTABL_T11 01B6: set_weather 1// = Sunny LA 0002: jump @JPTABL_EXIT
:JPTABL_T22 01B6: set_weather 2// = Sunny LA 0002: jump @JPTABL_EXIT
:JPTABL_T00// here goes the code if the value of the variable not exist in the jumptable 00BA: text_styled 'fem_off' 1000 ms 4 wait 1000 0002: jump @JPTABL_1
:JPTABL_T01 01B6: set_weather 0// = Extra Sunny LA 0002: jump @JPTABL_EXIT
:JPTABL_T11 01B6: set_weather 1// = Sunny LA 0002: jump @JPTABL_EXIT
:JPTABL_T22 01B6: set_weather 2// = Sunny LA 0002: jump @JPTABL_EXIT
0494: get_joystick_data 0 1@ 2@ 3@ 4@ this opcode reads values of the presetted movement controle of keyboard, joystick or gamepad depending to the settings which are done in Pause menue>options>controler settings of <left/right> <forward/backward>
1.param: playervalue, player 1 = 0, player 2 = 1 2.param: values of <left/right> 3.param: values of <forward/backward> 4.param: unknown 5.param: unknown
2. and 3. param returns either negativ or positiv values each which button is pressed so you need to check if the value is smaller or bigger than 0 to differ if the player use forward or backward left or right
script below shows the values which opcode 0494: returns by pressing left or right or forward or backward
I explained 0494 above the arrows in your screenshot are just a grafic help to press left/right left/right means the left/right controle which can be changed in the controler setup
A quick question if you would be so kind Zaz. A friend and i have been trying to implement the tlaser2 effect done by funtion x to a cleo laser vision mod as a superman add on. I suggested this in Funtion x's effect topic as well. I'd like it to have a masterspark effect, but without the coronas or animation. At first we tried editing the masterspark code to no avail. Now we have just this simple code my friend did, and i fine tuned the placement of the particle. The code works, but the damage it inflicts seems to be all around the player and not focusable, nor aimable. Any suggestions of assisting in this would be amazing. Also, the particle is attached to the player, can it be attached to the head bone?
Also if you happen to know what value in the effects.fxp defines the distance between the two lasers that would also be helpful. Here's a video and some pics of the effect, and also the code.
CODE
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
Kernlochbohrer Group: Members
Joined: Jan 10, 2005
QUOTE (kal-el5676 @ Apr 13 2011, 18:59)
A quick question if you would be so kind Zaz. A friend and i have been trying to implement the tlaser2 effect done by funtion x to a cleo laser vision mod as a superman add on. I suggested this in Funtion x's effect topic as well. I'd like it to have a masterspark effect, but without the coronas or animation. At first we tried editing the masterspark code to no avail. Now we have just this simple code my friend did, and i fine tuned the placement of the particle. The code works, but the damage it inflicts seems to be all around the player and not focusable, nor aimable. Any suggestions of assisting in this would be amazing. Also, the particle is attached to the player, can it be attached to the head bone?
Also if you happen to know what value in the effects.fxp defines the distance between the two lasers that would also be helpful. Here's a video and some pics of the effect, and also the code.
The effect havn't a source or target. It have only a size because it's a stretched image. And the spawnpoint in the script is the center of the image. The values of the size are written in the size part of the effect.
The most exactly method to find the target where the laser could hit anything is Wessers method, integrated in his Laser sight script But it's depending to the camera view, it's means it works fine by aiming because the player will have the same orientation like the camera if he aims with a weapon.
If the script should ignore the camera view and work without aiming like in your vid there is only one chance: It needs to throw an object which collide on the way of the laserbeam read Object - COLLISION - check
To attach an effect to actor bone needs the supportive opcode 0883:
:SPRAYWP_01 0001: wait 0 ms if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @SPRAYWP_01 if 0AB0: key_pressed 48//-----------------------press 0 004D: jump_if_false @SPRAYWP_01
066A: 0@ = attach_particle "spraycan" to_actor $PLAYER_ACTOR with_offset -0.1 -0.22 0.13 rotation -1.5 -3.5 0.0 flag 1 0883: attach_particle 0@ to_actor $PLAYER_ACTOR mode 26// right hand 064C: make_particle 0@ visible 0001: wait 2000 ms
{ 066A: 0@ = attach_particle "spraycan" to_actor $PLAYER_ACTOR with_offset 0.0 -0.5 0.0 rotation 0.0 -3.5 0.0 flag 1 0883: attach_particle 0@ to_actor $PLAYER_ACTOR mode 23// right hand 064C: make_particle 0@ visible 0001: wait 2000 ms