Spawning an object (bug in 0108: destroy_object ?)

Статус
В этой теме нельзя размещать новые ответы.

xzytro

Новичок
Автор темы
2
0
Hi,
Some days ago i wanted to make some alterations on my character's look. And shortly after, i've thought about creating a bag on the back of my character. Then, figured out that i will no longer be able to drive any car. Resulting from that, i've put "0108: destroy_object $object" for a deactivation before entering any cars. However, it did not destroy the object even though there wasn't a single fail (according to me). I've asked this to 3 different remarkable and well-known sources, still couldn't get a solid reply.
Here is the entire codeflow :
http://pastebin.com/eg0H2q2h

Before i forget, in order to understand where the code fail would be, i've placed some messages starting with "debug:" between the actions, so that if i don't get one message, i would understand the failed spot. However in this codeflow, i can get all the debug messages, while the object was not getting deleted once the script is theorically deactivated.
Is the fact here (the fact that 0108 doesn't destroy the object) really a bug ? Or is there a simple mistake in the codes ?
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,695
1,448
A terrible code.
Better don't use a lot of labels(jump, goto, etc.)
Opcode 0108 is working.
 

xzytro

Новичок
Автор темы
2
0
Better don't use a lot of labels(jump, goto, etc.)

Alright, if this is a terrible code, then can you show how the nice code will look like ? Especially without jump (and as to my knowledge goto means jump).

EDIT1: Perhaps you understand wrong, i didn't mean the opcode itself is bugged, i meant that a working opcode started not to be functional, and that it's caused by something that i had unconsciously done.

EDIT2: I fixed the problem.
Better don't use a lot of labels(jump, goto, etc.)
Thanks for the reply. The problem was the exceeded usage of labels. Reformulated the codeflow, and it's functional once again.

http://pastebin.com/F2hvRCx3
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,695
1,448
Oh... I could only so:
Код:
{$CLEO}
 
thread 'legend2360'
0662: "by legend2360"
0662: "BlastHack - Cheating is art"
 
while true
    wait 0 
    if and
        056D:  actor $PLAYER_ACTOR defined
        84C8:  not actor $PLAYER_ACTOR driving_flying_vehicle
        80DF:  not actor $PLAYER_ACTOR driving
        89DE:  not actor $PLAYER_ACTOR entering_car
        00E1: key_pressed 0 6 // Aim
    then
        showt "create object" 1500 
        while true
            wait 0
            if or
                0118:  actor $PLAYER_ACTOR dead
                0449:  actor $PLAYER_ACTOR in_a_car
                09DE:  actor $PLAYER_ACTOR entering_car
                0AB0:  key_pressed 88
            then break
            end
 
            gosub @create_object 
            070A: AS_actor $PLAYER_ACTOR attach_to_object 0@ offset -0.13 -0.05 0.0 on_bone 1 16 perform_animation "NULL" IFP_file "NULL" time -1
           
        end
        Object.Destroy(0@) 
        showt "destroy" 1500
    end
end
 
:create_object
Model.Load(3026)
repeat
    wait 0
until Model.Available(3026)
 
Actor.StorePos($PLAYER_ACTOR 1@ 2@ 3@)
0@ = Object.Create(3026, 1@, 2@, 3@)
Object.CollisionDetection(0@, false)
0750: set_object 0@ visibility true
Model.Destroy(3026)
return

I have incorrectly works opcode 070A.
 
  • Нравится
Реакции: xzytro
Статус
В этой теме нельзя размещать новые ответы.