- Messages
- 51
- Country

[Solved] <CallbackCode> bug
Hello everyone.
I have a really strange bug in my MouseRect.
I wrote this code :
It was working perfectly !
Ok, so I keep going and I write the code inside the CallbackCode :
Dammit, the cursor disappears... Then I delete this part of the code and come back to the working one.
But, it's still doesn't work...
The code is exactly the same than before but it doesn't work anymore.
The funny part is that I have a dozen of such "sna_...", all identical and those I didn't modify still work.
So I have this one not working :
and this one working perfectly :
It's exactly the same code with only the variable's name changing. I tried some XForm in GMax to check the clickable zone, tried to redo the animation and Mouserect procedures in GMax but no result...
I really don't understand how 2 identical codes are leading me to 2 different results...
Do you have an idea ?
Thanks
Edit : ": D" are replaced with
in the code but I did not put any smileys in my XML code ^^
Hello everyone.
I have a really strange bug in my MouseRect.
I wrote this code :
Code:
<PartInfo>
<Name>sna_prep</Name>
<AnimLength>10</AnimLength>
<Animation>
<Parameter>
<Code>(L:PrepPos, bool) 5 *</Code>
<Lag>50</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Selection du but de preparation</TooltipText>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>
</CallbackCode>
</MouseRect>
</PartInfo>
It was working perfectly !
Ok, so I keep going and I write the code inside the CallbackCode :
Code:
(M:Event) 'LeftSingle' scmp 0 ==
if{ 1 (>L:PrepPos, bool) }
(M:Event) 'LeftRelease' scmp 0 ==
if{ 0 (>L:PrepPos, bool) }
Dammit, the cursor disappears... Then I delete this part of the code and come back to the working one.
But, it's still doesn't work...
The code is exactly the same than before but it doesn't work anymore.
The funny part is that I have a dozen of such "sna_...", all identical and those I didn't modify still work.
So I have this one not working :
Code:
<PartInfo>
<Name>sna_dest</Name>
<AnimLength>10</AnimLength>
<Animation>
<Parameter>
<Code>(L:DestPos, bool) 5 *</Code>
<Lag>50</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Selection du but de destination</TooltipText>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>
</CallbackCode>
</MouseRect>
</PartInfo>
and this one working perfectly :
Code:
<PartInfo>
<Name>sna_bad</Name>
<AnimLength>10</AnimLength>
<Animation>
<Parameter>
<Code>(L:BadPos, bool) 5 *</Code>
<Lag>50</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>But ADditionnel</TooltipText>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>
</CallbackCode>
</MouseRect>
</PartInfo>
It's exactly the same code with only the variable's name changing. I tried some XForm in GMax to check the clickable zone, tried to redo the animation and Mouserect procedures in GMax but no result...
I really don't understand how 2 identical codes are leading me to 2 different results...
Do you have an idea ?
Thanks
Edit : ": D" are replaced with
Last edited:





