Menu

Show posts

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 Menu

Messages - GarageGothic

#2021
I'd say the problem is the line:

Code: ags
dmut.Loop=loopy;


Could you try storing dmut.Loop to an int before setting it to loopy, then reset it to the original state before the function ends? If you're just using it to make the player face the camera, perhaps you could use Character.FaceLocation instead?
#2022
I think you should just get on with your real game once you have the functionality working. That way the strategy part will seem fresh and original when we play it there, and afterwards you can always release the source code for the strategy game.
#2023
The music usually glitches when the engine is stuck in the same cycle for too long (low framerate). This can be due to disc access (for example on room changes) or CPU-heavy functions (often long while loops or DynamicSprite related operations). If the latter is the case, you can put a couple of Wait(1); commands into your code to allow the engine to proceed to the next game cycle.
#2024
Your hatred of repeatedly_execute_always puzzles me, it's among my favorite functions and I certainly don't consider my scripting cowardly.

If you really do need to trigger events when the character walks through the region areas (after having turned the actual regions off), you could just break up the walking command into multiple parts, so the character walks to coordinates within the region, you run the region event (copy pasted into your interaction code), and then give him a new coordinate to walk to.
#2025
You can use the Region.Enabled property to turn off the regions at the start of the interaction, then turn them on again at the end of the interaction script.
#2026
You import the background frames as sprites and assign them to a View of its own. Just like you would for a character.
Then, depending on whether you need it for a single or several rooms, you  insert the code mentioned in the other thread into either the room script or the global script.

If you insert it in the global script and want to call the function from a room, you need to also put:
Code: ags
import function AnimateBackground(int view, int speed, int loop);
import function StopAnimateBackground();


in the global header.

Now to use the function. Let's say you put your sprites in View 5 and want them to play at a framerate of one animation frame for every two game cycles, and you want the animation to loop. Then, whenever you need to run the animation, you simply call:
Code: ags
AnimateBackground(5, 2, 1);


Probably you want to do it in the EnterRoomBeforeFadein event, if the animation should play always. Otherwise put it in the event which you want to trigger the animation.


#2027
Thanks CJ. This time it imported fine. Haven't found any errors so far.

I just noticed that the 2.8 editor still displays corrupted transparent areas for alpha channel sprites, just like the old one. Is there any chance of getting rid of this annoyance?

Edit: Regarding import/export, as previously discussed it would be very convenient to have a text dump/re-import function using a format more similar to the translation source (no code fragments whatsoever, pure String/strings, GUI texts and dialogs).
#2028
I get this error message when importing my 2.72 Final 2 game with the new Alpha. It imports fine in Alpha 6. Didn't try Alpha 7, because I never got around to downloading it and can't find a link now.

Quote---------------------------
Adventure Game Studio
---------------------------
An error ocurred whilst trying to load your game. The error was: Object reference not set to an instance of an object.
If you cannot resolve the error, please post on the AGS Technical Forum for assistance.
Error details: System.NullReferenceException: Object reference not set to an instance of an object.

   at AGS.Editor.Components.MusicAndSpeechComponent.ReadFileTimes(XmlNode node, String elementName, Dictionary`2 fileStatuses)

   at AGS.Editor.Components.MusicAndSpeechComponent.FromXml(XmlNode node)

   at AGS.Editor.AGSEditor.ImportedOldGame()

   at AGS.Editor.OldGameImporter.ImportGameFromAGS272(String gameToLoad, Boolean useWizard)

   at AGS.Editor.Tasks.LoadGameFromDisk(String gameToLoad, Boolean interactive)

   at AGS.Editor.InteractiveTasks.LoadGameFromDisk(String gameToLoad)
---------------------------
OK   
---------------------------
#2029
General Discussion / Re: about blogger
Sun 27/05/2007 20:49:17
How about switching to WordPress?
#2030
Or just press Ctrl-X once the room has loaded.
#2031
You could try this workaround to have more than 5 background frames. Basically it draws sprites from an animation view onto the background using RawDraw routines.
#2032
A forum search for "buttons transparent" would have brought up this workaround which I came up with a while ago. Make sure to read the part below the code about overlapping buttons.
#2033
Just

Code: ags
RawClearScreen(63519)


before RawDrawing the sprite. All the pink pixels will become transparent when using DynamicSprite.CreateFromBackground.
#2034
Quote from: monkey_05_06 on Thu 24/05/2007 20:24:17There are instances where I want said sprite to have non-rectangular transparent areas. The RawDraw/DynamicSprite route wouldn't really solve my problem.

Could you please elaborate? Why shouldn't it be possible to have non-rectangular transparent areas?
#2035
Why not just RawDraw onto the background, create a DynamicSprite from background and use that for a graphical overlay? I do that all the time - even for text menus.

Edit: And in response to CJ, how about RawDrawing onto DynamicSprites instead? That would be much more versatile and could then be used for a graphical overlay. (the main difference from the above suggestion being that RawDrawing directly to DynamicSprites should support alpha channels, but of course that makes no difference for overlays since they can't display alpha).
#2036
The licensing issues in question is that you cannot use mp3 codecs in your game (unless you want to buy a license from Frauenhofer who own the format). So you'll have to compile your game with the mp3-less version of the editor. This is not really a problem since ogg vorbis offers superior audio compression anyway.
#2037
And if you need to use the game speed in script, define it as an actual number (usually 40) instead of using GetGameSpeed(). This was an issue with the smooth scrolling module in Nelly Cootalot  (on Linux I think).
#2038
On one hand I don't want to give up on this issue, as I find it interesting. But practically speaking, as this is for a cutscene, perhaps you would be better off positioning the car and changing the animation frames manually in script. If we're talking less than 50 frames that would be manageable and probably create the best result.
#2039
You're probably thinking of The Breakdown.
#2040
That functionality isn't very useful if you need a gradual increase anyway since there's a huge jump between 1 and 1/2.

Edit: In response to Gilbot's reply to this post (very confusing, I know): Sure I think that's the case too. I was just saying that doubling an object's movement speed from one frame to the next isn't exactly smooth. But if you set a fixed speed of 1/2 and adjust walk speed with scaling instead of incrementing the speed, of course that would work fine.
SMF spam blocked by CleanTalk