1. #1

    Deducting Faults

    Need help, I have:

    Area trigger-Set value event (decrease)- Variable data source with pick value object linked to game variable data source (Type: faults) it is not working.

    How do I deduct faults, how do I get the value of current faults at any given time? I thought the setup above would work. This has been bothering me for some time.
    Share this post

  2. #2
    dasraizer's Avatar Senior Member
    Join Date
    Apr 2014
    Location
    UK, Isle of Wight
    Posts
    1,195

    Re: Deducting Faults

    from what i've read gives this

    output=on_hit->subtract 1 from current number of faults and set to user variable.

    you can get the number of faults from the read only game variable data source set to faults, as you have, not sure why you needed to ask that question, unless you are trying to write to this!!?

    as a guess you are making a skill game, if so what you are doing is more or less correct, set your user value to the max number of faults, then inside the set value event , set the value to 1 so it decreases the user value by 1, now in the editor main menu under track settings, game mode settings, secondary score, make this a user value and point it to your user variable.

    not sure if this is what you are looking for as doesn't really deduct faults, but rather gives you a max number allowed, if you monitor the value to end the game when 0 is reached.
    Share this post

  3. #3

    Re: Deducting Faults

    No im no programmer. Its not a skill game either, trials. I am using a return to checkpoint event which gives you faults upon activation but if I disable reset physics it causes my xbox to crash. So I thought I could work around it by instead just deducting a fault but it doesn't seem like that is possible?
    Share this post

  4. #4
    dasraizer's Avatar Senior Member
    Join Date
    Apr 2014
    Location
    UK, Isle of Wight
    Posts
    1,195

    Re: Deducting Faults

    oh freezing xbox

    try clearing your hard disk cache, located under storage , i think its the Y button to bring the maintenance up, a few people here have tried this and it seems to work, it will mean re-downloading any game patches when you go to play a game for the 1st time after doing this, i do this every so often, it certainly helps to eliminate the constantly asking to update when i play a lot of different games.

    edit: the only way you can stop the faulting is as you said.
    Share this post

  5. #5

    Re: Deducting Faults

    Originally Posted by dasraiser
    oh freezing xbox

    try clearing your hard disk cache, located under storage , i think its the Y button to bring the maintenance up, a few people here have tried this and it seems to work, it will mean re-downloading any game patches when you go to play a game for the 1st time after doing this, i do this every so often, it certainly helps to eliminate the constantly asking to update when i play a lot of different games.

    edit: the only way you can stop the faulting is as you said.
    Hmnn you are awfully helpful here... and suspicious
    Thank you, whoever you are.

    EDIT: Actually I have another if you dont mind. I am trying to build a flamethrower attached to the game character, I want it rotating so it can be aimed with the Right stick, and I want it to destroy objects.

    the problem is the flame effect is not an object so It cannot be used with the Hit trigger. I have tried custom collisions, area triggers, placing objects behind the flame. But there is always something that conflicts with every alternative I come up with (hate it when that happens).

    The other problem is I dont know how to set up having it rotating and attached to the game character. Im guessing all done with OPE and not have it actually attached to the game character, just moving with it. Furthermore how would I assign the rotation to the right stick.
    Thanks.

    Im gonna try and work it out right now, but If fail ill be back .
    Share this post

  6. #6
    dasraizer's Avatar Senior Member
    Join Date
    Apr 2014
    Location
    UK, Isle of Wight
    Posts
    1,195

    Re: Deducting Faults

    i like helping and getting help, just spreading the love is all

    will have to get back to you on the rotation, its not too complex, but im out of time, here its 2am :/

    couple of things to try/think about:

    you could try to glue an object like the dummy set on no-contact (i think?,it will still trigger) to your flame

    i would use OPE as it doesn't affect the rider/bike and i would also spy on the part of the bike you want the flames to be produced with a few object infos (XYZ and the rotation will be required but this is tricky to get right though)

    however a custom set physics joint would work just as well (and probably be much easier), just make any connected items weigh as little as possible and make the joint strength 1, then linear the Upper/Lower limit on one of the X,Y or Z angular values to get it to rotate, to test just loop a number between 0 and 360, and all things being correct it should spin like a Catherine Wheel.
    oh and dont forget to set the pivot correctly, normally a double click of the right stick will do.

    i got to get some kip
    Share this post

  7. #7
    dasraizer's Avatar Senior Member
    Join Date
    Apr 2014
    Location
    UK, Isle of Wight
    Posts
    1,195

    Re: Deducting Faults

    well i've found a fairly neat way to do the flame thrower, it does have a small glitch , im working on this, not sure if its a bug with the game or just how i've done the rotation.

    well here it is, its only 17 items so not too bad

    numbers in brackets like (7) means the item you created at number 7: in this case the OPE
    do this in order and hopfully it will be fairly easy to construct, im trying to find a nice way to describe the build, so i can release revV4 or revV5, so this is kind of a beta run

    set a snap plane up like this as it may help,
    open up the editor settings menu and uncheck snap X,Y and Z
    place a Legacy wooded box and put it on the driving line before your start gate, snap this to the driving line with a right stick click and place it close to the ground.
    now open up the editor settings again and re-check X,Y,Z and set then select 'Snap workplane - select target' and choose the wooden box.
    ( i do this for every track/idea im working on as its easier for me to snap the tiles in place, as i need to re-select the plane every time the editor is loaded :/ )

    object construction:

    place:

    1: a physics joint

    2: a glue pivot - set the pivot type to manual

    3: a dummy object - leave physics unchecked and set 'Physics Type' to 'No Contact Response', uncheck 'Collision Sound' and check 'Fast Object' (although this may not be needed)
    the dummy object will be placed where the center axis of rotation will be, the bike is selected in this example further on.

    4:the fire effect, set this to 'no contact response'

    5: a custom collision - use the cylinder (or best fit) and set 'Physics Type' to 'Contact Response' , uncheck 'Collision Sound' and check 'Fast Object'
    this is used to encapsulate the flame so it can be used in a hit target

    wire:

    select the glue pivot(2) and glue the fire effect(4) and custom collision(5)

    move the fire effect(4) inside the custom collision(5) volume with bumper select.

    select the glue group (call this flame thrower) and enable physics, set the wieght to minimum, uncheck 'Collision Sound' and check 'Fast Object', leave the rest.

    move the glue pivot next to the dummy object(3), this is so the flame effect is just to the side of the bike.

    a visual clue hmm

    >===> (top view bike)

    ....d
    ....p----f/c

    d is the dummy
    p is the glue pivot the ---- is the glue wires
    f/c are the fire and collision.
    the whole construction will move d to the bikes location along with p---f/c next to it, when complete.
    (ignore the ..... as this text editor is truncating the spaces :/ )

    physics joint:
    open up the physics joint(1) and
    set properties to user defined
    select target1 as the dummy object(3) and target2 as the glue group flame thrower
    check both disable collision and pivots combined
    select pivot and snap move the pivot inside the dummy object (3)
    and leave the rest for now

    place:

    6: six 'Object Info Data Source', set 3 to Position X/Y/Z and 3 to Angle X/Y/Z , group these items for ease and point 'Select Object' to the bikes body.

    7: Object Position Event
    set this up with (top down)

    Modify Position checked
    Local unchecked
    point Position X/Y/Z to the 3x Object Info Data Sources (taken from 6) that are set to Position X/Y/Z

    Check Modify Rotation
    Uncheck Local
    Check Set Rotation
    point Yaw to Angle X, Pitch to Angle Y and Bank to Angle Z (taken from (6) )
    point 'Select Event Targets' to the dummy object (3) , testing this i found you will have to move the physics joint out of the way, not so bad as it can be snapped back in place.

    8: Variable Data Source

    9: Set Value Event
    make 'Set Type' 'Set'
    point 'Select Event Targets' to the 'Variable Data Source' (8)
    point 'Select Event/Filter' to the OPE (7)

    10: place an Interval Trigger if you don't have an impulse chain and point 'Select Event/Filter' to the 'Set Value Event' (9)

    now for the rotation control, this uses the right stick horizontal value.

    place and wire:

    11: Game Variable Data Source
    set 'Type:' to Right Stick Horizontal Value

    12: Two-Input Operator
    set 'Operation' to 'Add' , Operand1 to the Variable Data Source (8) , Operand 2 to Game Variable Data Source (11)

    13:Two-Input Operator
    set 'Operation' to Greater , Operand1 to Two-Input Operator (12), Operand2 to 179

    14:Two-Input Operator
    set 'Operation' to Multiply, Operand1 to Two-Input Operator (13), Operand2 to -358

    15:Two-Input Operator
    set 'Operation' to Less, Operand1 to Two-Input Operator (12), Operand2 to -179

    16:Two-Input Operator
    set 'Operation' to Multiply, Operand1 to Two-Input Operator (15), Operand2 to 358

    17:N-Input Operator
    set 'Operation' to Add
    point 'Select Operands' to these Two-input Operators (12) (14) (16)

    open up the 'Set Value Event' (9) and point 'Value' to the N-Input Operator (17)

    now for the final step
    open up the Physics Joint (1) and go to the 'Angular Settings' -> point 'Lower Limit Z:' and 'Upper Limit Z:' to the N-Input Operator (17) and make sure the other limits are all 0
    i needed to used the Z limit, but you may find that you need to use the X or Y as this depends on the rotation of your Physics Pivot.

    save your work.

    now hit the back button to turn physics on and the whole construction should be placed by the bike, if not don't panic, just move each item of the glue group (including the pivot) until they are in place.

    test your track and hopefully if I've not messed up, the right stick should rotate the collision and fire effect.

    the glitch is kind of annoying , i never noticed it before as i only drove the physics limits well within +/-180' of rotation, if this is a problem ,just spy (object info) on the position of the fire effect (XYZ and angles) and create another OPE that is pointing to a hit box, and just un-glue and delete the custom collision. EDIT: this will still have the bug doh
    i did try to correct this glitch hence the 179 and 358 instead of 180 and 360, but this didn't help in the slightest, also i found playing with the joint restitution under the angular settings changed the behaviour.

    here's a question, why does it say for No Contact Response, no collision but sends impulses when hit when it actually doesn't?.

    that was a fun exercise
    hope this helps and good luck.
    Share this post

  8. #8

    Re: Deducting Faults

    WOW, thanks. I owe you one.
    Maybe play my "Alien Abduction!" Track. Experience the events of the Roswell UFO incident first hand
    Share this post

  9. #9
    dasraizer's Avatar Senior Member
    Join Date
    Apr 2014
    Location
    UK, Isle of Wight
    Posts
    1,195

    Re: Deducting Faults

    will do

    edit: wow thats cool, i gave it my best shot but ninja skill and extreme are going to burst a vein in my head, so i watched the replay, but after seeing what may happen on the finish line, i will give this another go

    i also attempted you other tracks, decent was nice looking, again had to stop on the rock drop into the water, grrrr hard.

    cant wait to see what other tracks you produce
    Share this post

  10. #10

    Re: Deducting Faults

    Having a problem: the Flamethrower is just falling to the ground. The OPE should be holding it in place yes?

    Didnt you try "Alien Abduction!" not "RoswellUFOincident"? A Abduction is a much easier version of the latter, but still requires some advance skills I suppose.
    Share this post