xPert command "if"...

Help each other out

xPert command "if"...

Postby alamata on Mon Sep 03, 2007 12:30 am

hey,

i asked to me if it was possible
to have a command in xPert
to have an event that it'll be in action
at the end of a png sequence... :arrow: :idea: :shock:

i have sawn that it's existing a "if" and '"ifnot" command
can they be appliccable at the end of an slideshow (animation)

have an event who produce his effect at the end of the png sequence...

thanks for your comprehension...
alamata
 
Posts: 70
Joined: Thu Jan 11, 2007 12:03 pm

Re: xPert command "if"...

Postby P3rv3rt B3ar on Mon Sep 03, 2007 1:09 am

Its not currently possible to have command happen when animation ends... however this could be nice addition, and ill think about adding it.

Before implementing it though id like to ask if there is any possibility to generate xlobby trigger within plugin? if end of animation would cause a trigger to fire instead of executing a command, i think it would be more general and more in spirit with xlobby, im pretty sure however this is not possible, but im not too familiar with triggers anyway, anybody, care to shine on the matter??
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: xPert command "if"...

Postby alamata on Mon Sep 03, 2007 10:00 am

P3rv3rt B3ar wrote:... however this could be nice addition, and i'll think about adding it.


yes...,
i think this could be a good thing for the integration of a png sequence in xlobby...
and it could be a new step for this integration in the GUI of xlobby...

i m waiting with impatience this implementation
who i hope dont ask you too much work.... :wink:

rem: i dont help concerning the use of the tiggers in xlobby, sorry :oops:
alamata
 
Posts: 70
Joined: Thu Jan 11, 2007 12:03 pm

Re: xPert command "if"...

Postby defrag on Mon Sep 03, 2007 10:13 am

P3rv3rt B3ar wrote:Before implementing it though id like to ask if there is any possibility to generate xlobby trigger within plugin? if end of animation would cause a trigger to fire instead of executing a command, i think it would be more general and more in spirit with xlobby, im pretty sure however this is not possible, but im not too familiar with triggers anyway, anybody, care to shine on the matter??


Random thoughts warning!!!! :lol:

The only way to do this would be to raise a .Net event in the plugin, but that would mean that XLobby would have to be able to subscribe to that event, which would mean Steven adding something (what I don't know) but that would be too open ended to code. Although.... would it be possible to have another plugin that all it did was handle events from the main plugin? Not really sure that would be any benefit or would be totally overkill.

Maybe just better to extend your input commands to handle a "do this after something has done something else" and that your plugin raises and handles it's own events. e.g. somehow deal with "onend("close overlay")" in your input and then build a xlobby send command that fires that event when the onend bit in your plugin fires. You could easily add the events and only act on them if someone references them in your input strings.

Best of luck!!!!!!
defrag
 
Posts: 376
Joined: Mon Jan 16, 2006 7:56 am
Location: Didcot, UK

Re: xPert command "if"...

Postby P3rv3rt B3ar on Mon Sep 03, 2007 11:41 pm

alamata wrote:i asked to me if it was possible
to have a command in xPert
to have an event that it'll be in action
at the end of a png sequence... :arrow: :idea: :shock:


Ive just added requested functionality, it seems to work fine, but i will test it bit more, and release later tonight.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: xPert command "if"...

Postby P3rv3rt B3ar on Tue Sep 04, 2007 1:22 am

Ok, new BHE version available on server. Just use earlier BHE link.

Testing revealed an earlier bug, which was introduced when framerate option was introduced StartSlideShow command. I have reason to believe that this was the so called "Rika's bug" which caused animations to continue consume processing power even after theyve been stopped. Its now fixed.

I try to keep xPerT syntax forward compatible to extent possible, so users wont need to change their skins when new version is available, however this change for certain technical reasons, might need syntax change later when i introduce planned transitions to slideshows. That is reason why i wont document this feature in xPerT thread, lets keep it "unofficial" for now.

Ok lets get to it... U can add optional specifier of event, to be runned after animation completes, following the fps value, either to loadslideshow variable or StartSlideShow command. Format of event spefier is typical to xPerT:

Code: Select all
EVENTGROUP>EVENT


so in real life situation it could be:

Code: Select all
SKIN>overlays>show_fans


well it all depends how u named your events... Heres the whole variable:

Code: Select all
plugin>xPerT>!instant!loadslideshow>ani>[skin:\buttons\test_f[11...30].png]>runonce>1/20>SKIN>overlays>show_fans


Same principle goes with StartSlideShow command, u add event specifier after fps rating.

Few more points:

* If u just added the command u want to run, restart xlobby cause xPerTs command interpreter refreshes its vocabulary on restart.
* u can use "NOP" as a event specifier, but only in StartSlideShow command. This is useful in rare situations where u have defined event to loadslideshow variable, but later want to re-run animation, without execution of the event defined in variable.

EDIT:

* Allthough framerate is optional in StartSlideShow command, event specifier can only be used within, when framerate is included.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: xPert command "if"...

Postby alamata on Tue Sep 04, 2007 6:13 am

wonderfull... :!: :!: :D

so nice so fast.... :D :wink:

what to ask moreover....

thanks a lot for this implementation....
alamata
 
Posts: 70
Joined: Thu Jan 11, 2007 12:03 pm