Teleporting rooms glitch - gml

Whenever i go to a particular area it always teleports back to the center hallway.* Example:(https://www.dropbox.com/s/mye0k8n9ysua6cb/Video%203-29-2017%206-24-13%20PM.avi?dl=0)
I've tried deleting and changing a bunch of objects and I'm pretty sure it's related to the player
The code is quite interesting so I'll just link the project(https://www.dropbox.com/s/bmjj7fyxc5qasbg/Undertale%202%20above%20the%20underground.project.gmx?dl=0)
I am using game maker studio 1.4

You didn't explained your problem very well, however, if you used the Previous room event that might be the problem because it backs the previous room that listed not the one used.
and you can create an invisible object to teleport between rooms, for example;
create an object like level1_2 then create a sprite & collision box for it.
place it in the hallway then use goto_room(room_level2); with the collision event.
duplicate the object level1_2 and rename it to Level2_1
change the code to goto_room(room_level1);
this should cause no problem because it is the by far the most reliable time-consuming way.

Related

MS Office Word macro, play sound upon scrolling through certain pages

I've already got the useful tip of how to play an external audio file.
And now I'm struggling of how to use it upon reaching a certain page.
I've managed to find that I have to add the stuff below to obtain a list of events I can use:
Public WithEvents App As Word.Application
And I got a plenty of the events:
App events
But no one from them seems corresponding to what I need.
1)Find out a certain event I can use, to track any action which might change currently viewed page(mouse scroll, arrows, page up/down, mouse move with selection, or any of others..) and then paste a checking function into.
2)The checking function supposed to obtain number of current page within the document(or it's equivalent) and if we are at a certain page play corresponding sound.
There are 2 main problems I've struggled with, but got no good idea.
I also aware that we can use ActiveX object and insert an audio file into the document, it allows to even not keep the file somewhere, but embeed it into the doc.
However here I even have no idea of how to trigger playing of the file through VBA.
But if somebody can advise about it would be perfect because it even more handy, in terms of maintenance(no need to keep external audio files).
Any help is appreciated.
If you know that it's impossible in general, please also let me know, so I can close the topic.

Word cannot undo this action. Do you want to continue?

I have a document into which I copy all kinds of VBA code regarding questions asked on this site and write code in preparation for answers. This document was created on my PC (with Word 2010). It has no event procedure that runs on the Save event, but at some point a few weeks back it started to ask me the above question before every save, including automatic saves. The document is based on the Normal template which has no code in it. I don't know which code may have caused this to start, nor which code to even suspect. Other documents open in the same instance of Word save normally. It's only this one document that is affected.
The document also contains a lot of special items, like content controls, fields, ActiveX controls, EndNotes, tables and comments. I suspect the comments to be related to this problem in some way.
I know that I could probably stop the alerts by disabling alerts but that isn't what I want. I want Word to display all the normal alerts. It's just this abnormal one which I would like to switch off. Any ideas how to do that? Or what caused Word to issue that alert in the first place?
In these situations I make several backups of the document and then start looking for something that is broken. So using a new backup each time, I systematically delete portions of the document to see if the unwanted / unexpected behavior disappears. For example I first try to isolate the issue to the top of bottom 1/2 of the document. If I can establish that the issue is related to the bottom half then I delete half of the bottom half of the document and so on... it can take a while but it has been an effective method of finding issues for me.
That said, I tried this on a document recently and just ended up going round in circles. I thought I had narrowed the issue down to a single corrupt image, but that turned out to be NOT the case.
I've also found that there are some things that I can do with VBA that Word simply can NOT undo... I'm only aware of a few things (which I'd have to look up in my notes) but I'm sure there's a whole list of things.
A possible workaround might be to clear the undo history for this specific document prior to saving, I imagine that will suppress the message and save you from losing the standard notifications. Hope it helps :)
Good luck!

Position of PictureBoxes in form design window do not correspond to their position during runtime

EDIT: I realized that I didn't tag this properly - I should have included vb.net as a tag, on the grounds that there could be a code based solution. Note, that no changes to the resolution are made in my source code.
UPDATE: When the program starts execution, the left coordinate for each PictureBox is multiplied by ~0.376, whilst the top coordinate for each PictureBox.Top is multiplied by ~0.418 . This "down-scaling" applies to all picture boxes. The source code I have is incredibly rudimentary and cannot be responsible for this. I also looked at another project and I still face the same error. A simple but poor fix would be to divide each coordinate by the corresponding values mentioned above.
In order to show you the issue I'm facing, please look at the images below. Compare this image, where each PictureBox (i.e. a snake, set of arrows, etc.) has been placed so that they line up with a feature of the background image:
To this image, where the PictureBox elements are bunched together. Their positions have been "down-scaled" closer to the origin of the form (note that all the elements are transforming horizontally during runtime, which is why the elements are in the top right corner):
In the solution I was given (developed in VS 2010 I believe), the position of each PictureBox goes beyond the background image as shown:
It is clear that each picture box has been placed in an organized fashion. During execution, each PictureBox goes to it's intended position (i.e. lines up appropriately with the background image).
Obviously, the original developer of the solution I was given would have not faced the problem I am. The fact that the solution works properly during runtime indicates some kind of error with my instance(s) of VB. Does anyone know of any solutions?
I've came across this question which asks how to change the default resolution for a Windows 8 App and this question which asks why some applications appear differently on different machines, but they pose no clear solutions. I would appreciate any help, since it's holding me back from critical work I must do. Thank you in advance!
I feel a little silly now - I started carrying out a bit more research on VB forms and came came across this Microsoft documentation on form scaling. Realizing that my issue may have been caused by having this scaling automatically carried out, I then found the AutoScaleMode property of my form and changed it from Font to None, which resolved my problem.

TranslateAnimation resetting views occasionally

I am busy developing my first android app which is essentially a bubble burst type of game.
So far everything works except when I want to update a text box with a score.
Views are moved using translateanimation and all works as expected as long as a simple .setText() is not used.
When this is added occasionally some views that have been moved around previously suddenly move back to their original position. Additionally some variables also are set back to their original value.
I have tried updating the score via asyntask as well as runonuithread but the same issue occurs.
Thanks
I sorted it out.
I had the text box which I use for the score in a seperate xml and in that xml I had a include statement pointing to another xml file which had all the controls which are used as bubbles/blocks.
By including the score text box in the same xml the issue was sorted out.
There must be some rules that Android has regarding animating/updating controls across two seperate layouts.

Creating chess graphics in Visual Basic

I am creating a multiplayer chess game in Visual Basic.Net and I need to create tiles for the game.
Earlier, I used buttons for the tiles, but then I realized that not only did they look ugly, but the coding part also became a problem. Also, the images of the chess pieces didn't properly fit on the buttons and they became distorted. Also, shifting the image to a different button every time a move was played also became very inefficient.
So, in view of these difficulties, I want to build a proper board, but I have no idea where to start from or what controls to use for the design. Any suggestions?
A Chess Program using VB.NET : http://www.vbdotnetheaven.com/UploadFile/kaushalgol/ChessProgramInVB11142005235115PM/ChessProgramInVB.aspx
This was coded in VB6 : http://freesourcecodevisualbasic.blogspot.se/2011/07/source-code-2-player-chess.html
You don't wany to use controls for the pieces you should just draw the image directly onto your form. You then have full control of exactly where everything is drawn.
You need to hold some form of data structure that 'remembers' where all your pieces are.
Have a look at this link to GDI+ to help get you started
I would suggest it might be too complicated for a school project. Maybe if you reduce the scope - try for just human vs human.
Anyway,
The chess programming wiki
Bruce Moreland's old page on MinMax and other adversarial search algorithms
I have more links but i cant post any links anymore. It's limited to 2 links only. Im sorry.