Simple usage of maniascript for Controller plugins:
Posted: 14 Sep 2011, 13:24
As i used a little maniscript for my teamspeak plugin , here now some lines of code to get a frame movin by mouseover:
For questions , just ask.
For questions , just ask.
Code: Select all
[code]<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<manialink version="1" background="0">
<frame id="294" posn="138 40" sizen = "120 8" scale="0.8" >
<timeout>0</timeout>
<quad id="295" posn="0 0 1" sizen="160 8" ScriptEvents="1" />
<quad posn="0 0 3" image="http://www.teamspeak.com/media_repository/files/mediakit/buttons/button02_100x45.jpg" sizen="28 9" />
<script><!--
declare teamspeak = (Page.GetFirstChild("294") as CGameManialinkFrame);
while(True) {
yield;
foreach(Event in PendingEvents)
{ if(Event.Type == CGameManialinkScriptEvent::Type::MouseOver) {
if(Event.ControlId == "295")
{ for (a , 0 , 39) { declare f=teamspeak.PosnX; if (f>=60){ teamspeak.PosnX += -2; sleep(1); } } } }
else if(Event.Type == CGameManialinkScriptEvent::Type::MouseOut) {
if(Event.ControlId == "295")
{ teamspeak.PosnX += 80;} } } }--></script>
</frame>
</manialink>