I hope that when self moves to the ent position, self can stop immediately

You should learn how to type scripts better cause it's hard to read and grasp block of lines like the above.
I had to arrange those lines to understand what you want with those.
That being said, I disagree with merging multiple functions into one like this. There is a reason I split functions into what's you seen in my games and the reason is flexibility.
I don't know if your function is going to work properly or not (I see some redundancies there) but my suggestion is to split it into multiple functions.
Thank you Mr. Bloodbane for your attention and reply, the code paste function of the forum, can you tell me how to use it again? Because I used it once a long time ago
Forgot about it after that, please tell me again, and I'll take it all down. thank you all.
 
You should learn how to type scripts better cause it's hard to read and grasp block of lines like the above.
I had to arrange those lines to understand what you want with those.
That being said, I disagree with merging multiple functions into one like this. There is a reason I split functions into what's you seen in my games and the reason is flexibility.
I don't know if your function is going to work properly or not (I see some redundancies there) but my suggestion is to split it into multiple functions.
Bloodbane Mr suggestion is very good. I would like to express my gratitude here. The process is not important, but the result is the most important. I agree with Bloodbane Mr. solution and hope to achieve the effect seen in my dynamic picture. Thank you very much and wish you good health ,Enjoy your work
 

Attachments

  • IMG_0542.GIF
    IMG_0542.GIF
    3.4 MB · Views: 2
I don't understand when this animation will be played. If it's triggered by something, it would be better for that something to run item find script and decides what to do with the result.
Thank you Mr. Bloodbane for your reply. I solved the problem you mentioned in this way. I added a script to the (anim turn) animation, which can detect the existence of an item with a specific name. If the item exists, self will be converted directly. Go, the animation of running and picking up weapons, thank you and wish you good health and happy work
 
Code:
anim    turn

@script

        if (frame==0){

                      void i=0,h=0;

for(i=0; i<openborvariant("ent_max"); i++) {

void ent = getentity(i);

if((getentityproperty(ent,"exists"))

&& (!getentityproperty(ent,"dead"))

&& (getentityproperty(ent,"TYPE") == openborconstant("TYPE_ITEM"))

&& (getentityproperty(ent,"model") == "horse-e"")) {



  h=1; /

}

if(h==1) {

               void self = getlocalvar("self");

               performattack(self,openborconstant("ANI_follow99"),1);

}

}

}

@end_script

    Delay    1

    OffSet     164 171

    BBox    156 82 29 94

    Frame    data/chars/lvbu/idle001.gif



anim follow99

loop 1

Delay 6

@cmd targetentity 2 1 0 0 "ITEM" "horse-e"

OffSet 164 171

BBox 154 106 33 69

Frame data\chars\zhanghe\walk001.gif

OffSet 164 171

Frame data\chars\zhanghe\walk002.gif

OffSet 164 172

Frame data\chars\zhanghe\walk003.gif

OffSet 164 172

BBox 154 106 33 69

Frame data\chars\zhanghe\walk004.gif

OffSet 164 171

Frame data\chars\zhanghe\walk005.gif
 
Last edited:
I still can't find the icon how to use the paste code function, please tell me again, thank you!!
 
Last edited:
Back
Top Bottom