Lol,
And you sir are no 'holy-cow'!
And you sir are no 'holy-cow'!
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 MenuQuote from: Funkpanzer on Sun 18/12/2016 13:56:17Have a good trip
I leave for the in-laws in six days so chances are this is going to be a mess!
Is anyone doing a straight up adventure game this MAGS?
InventoryItem *itemToSwap = player.ActiveInventory;
if (itemToSwap.GetProperty("isGlasses"))
{
glasV = itemToSwap.GetProperty("InvenView");
}
InventoryItem *itemToSwap = player.ActiveInventory;
if (itemToSwap.GetProperty("isGlasses"))
int glasV = itemToSwap.GetProperty("InvenView");
if (iInvHat1.GetProperty("IsHat"))
os = (v*100 + l*10 + f); // no more than 9 frames or 9 loops or 100 views!! gives a unique number to each viewframe.
ViewFrame *origFrame = Game.GetViewFrame(v, l, f);
OriginalSprite[os] = origFrame.Graphic;
// main global script file
DynamicSprite *frame[1000];
void Swapper(int swapX, int swapY)
{
Character *SwapChar;
SwapChar = Character.GetAtScreenXY(swapX, swapY);
if (SwapChar == null || SwapChar == player)
return;
//if (cRat.ActiveInventory == iHat1)
int hatV = 3;
if (SwapChar == cNpc)
{
int vs = SwapChar.NormalView;
for (int l = 0; l < 3; l++)
{
for (int f = 0; f < Game.GetFrameCountForLoop(vs, l); f++)
{
ViewFrame *head = Game.GetViewFrame(vs, l, f); // selects the correct viewframe for this new dynamicSprite
ViewFrame *hatF = Game.GetViewFrame(hatV, l, f); // selects the correct viewframe for this new hat
Display("printing Hat: View%d Loop%d Frame%d onto Character: View%d Loop%d Frame%d", hatV, l, f, vs, l, f);
if (head == null || hatF == null)
Display("Pointing to No Frame");
int sp = head.Graphic; // locates the original sprite# for this viewframe
frame[sp] = DynamicSprite.CreateFromExistingSprite(sp); // make dynamicsprite with same index# as original, use a stock sprite for the DynamicSprite
DrawingSurface *surface = frame[sp].GetDrawingSurface();
Display("got the sprite to draw on %d", sp);
surface.DrawImage(37, -23, hatF.Graphic); //draws the correct hat position onto the DynamicSprite
surface.Release();
head.Graphic = frame[sp].Graphic; //changes this viewframe to new dynamicSprite
}
}
}
}
Quote---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0041E779 ; program pointer is +3330, ACI version 3.4.0.13, gtags (0,74)
AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.
Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK
---------------------------
// main global script file
DynamicSprite *frame1;
void Swapper(int swapX, int swapY)
{
Character *SwapChar;
SwapChar = Character.GetAtScreenXY(swapX, swapY);
if (SwapChar == cNpc)
{
frame1 = DynamicSprite.CreateFromExistingSprite(37);
DrawingSurface *surface = frame1.GetDrawingSurface();
surface.DrawImage(32, -23, 17);
surface.Release();
ViewFrame *head = Game.GetViewFrame(SwapChar.View, 0, 0);
head.Graphic = frame1.Graphic;
//frame1.Delete();
Display("drew on sprite");
}
}
void Swapper(int swapX, int swapY)
{
Character *SwapChar;
SwapChar = Character.GetAtScreenXY(swapX, swapY);
if (SwapChar == cNpc)
{
DynamicSprite *frame1 = DynamicSprite.CreateFromExistingSprite(37);
DrawingSurface *surface = frame1.GetDrawingSurface();
surface.DrawImage(35, 110, 17);
surface.Release();
ViewFrame *head = Game.GetViewFrame(SwapChar.View, 0, 0);
head.Graphic = frame1.Graphic;
frame1.Delete();
Display("drew on sprite");
}
}
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.105 seconds with 14 queries.