Oh yes, sorry. I have trouble with big words.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuViewFrame *frame = Game.GetViewFrame(cEgo.NormalView, 0, 0);
//And then:
cEgo.z=(0 - (Game.SpriteHeight[frame.Graphic] / 2));
//Or alternately:
cEgo.Walk(100, 100+(Game.SpriteHeight[frame.Graphic] / 2));
Quote from: Ashen on Sun 28/01/2007 15:35:03
If the problem is just that the Button doesn't change graphic, then as I understand it DynamicSprites declared in a function (e.g. a Button's Control function, or the on_key_press condition that opens the Load Game GUI) are only good in that function - once it finishes running the DymanicSprite is deleted, and all uses are cleared.
function DrawStaticOnButton(int StaticDSX, int StaticDSY, Button *theButton)
{
DynamicSprite *StaticDS = DynamicSprite.Create(StaticDSX, StaticDSY);
DrawingSurface *StaticDSsurface = StaticDS.GetDrawingSurface();
int StaticDSpointX = 0;
int StaticDSpointY = 0;
while (StaticDSpointY<StaticDSY+1) {
while (StaticDSpointX<StaticDSX+1) {
if (Random(1)==1) {StaticDSsurface.DrawingColor = 15;} else {StaticDSsurface.DrawingColor = 0;}
StaticDSsurface.DrawPixel(StaticDSpointX, StaticDSpointY);
StaticDSpointX++;
}
StaticDSpointY++; StaticDSpointX=0;
}
StaticDSsurface.Release();
theButton.NormalGraphic=StaticDS.Graphic;
}
function StartTalkSystem(Character *chartalkto, Dialog *chardialog)
{
TSMouseX=mouse.x-(gTalkSystem.Width/2);
TSMouseY=mouse.y-(gTalkSystem.Height/2);
while ((TSMouseX+gTalkSystem.Width)>=System.ScreenWidth) {
TSMouseX--;
}
while ((TSMouseY+gTalkSystem.Height)>=System.ScreenHeight)
{
TSMouseY--;
}
gTalkSystem.X=TSMouseX;
gTalkSystem.Y=TSMouseY;
gTalkSystem.BackgroundGraphic=572;
gTalkSystem.Visible=true;
TSAnimateButton.Visible=true;
TSAnimateButton.Height=66;
TSAnimateButton.Width=169;
TSAnimateButton.Animate(70, 0, 3, eOnce);
while (TSAnimateButton.Graphic!=581) {Wait(1);}
TSAnimateButton.NormalGraphic=572;
gTalkSystem.BackgroundGraphic=581;
TSAnimateButton.Visible=false;
mouse.Mode=eModeWalkto;
DrawStaticOnButton(49, 60, TSLeftPortrait);
}
while (TSAnimateButton.Graphic!=581) {Wait(1);}
function StartTalkSystem(Character *chartalkto, Dialog *chardialog)
{
gTalkSystem.BackgroundGraphic=572;
gTalkSystem.Visible=true;
TSAnimateButton.Visible=true;
TSAnimateButton.Height=66;
TSAnimateButton.Width=169;
TSAnimateButton.Animate(70, 0, 3, eOnce);
TSAnimateButton.Visible=false;
TSAnimateButton.NormalGraphic=572;
}
function SayCustomFont(this Character*, string message) {
if (this == cEgo) {Game.SpeechFont = eFontEgoSpeech;}
else if (this == cRoger) {Game.SpeechFont = eFontRogerSpeech;}
else ...
//etc. for every character in the game that you want to use a custom font
this.Say(message);
}
@1
cEgo.SayCustomFont("Hi, I'm using a custom font.")
cRoger.SayCustomFont("So am I! My font is different to yours!")
return
function repeatedly_execute() {
if (cPlay.ActiveInventory == iPencil) {
iPencil.Graphic = 48
}
else {
iPencil.Graphic = 46
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.047 seconds with 16 queries.