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 - spook1

#41
I did as you said.
Updated translation,
.tras file does really exist and is in compiled folder.

Only thing is that I do not have a winsetup.exe!
It is not here, copying in from another game does not work

yet, I can select the translation file in the setup menu in: file -> setup

Strange, isn't it?
#42
I chnaged the source.zip. It is complete now:

www.xs4all.nl/~koops/room7.zip
#43
Indeed, that is exactly what I did.

I translated games before ;-)
But then I could choose for a translation in winsetup.exe, which is not existing anymore,

Therefore I select the translation in the File -> Setup Game menu and then choose for save and run.

P.S. I may have changed a few characters in the original lines, due to typing errors, would that harm the whole process?
#44
Finally, after many debug parameters and test I found it.

I am very sorry to tell that you guys could not have figured it out: it was my coding error  :-[

I apologise for having tkane so much of your time, for a stupid scripting error. :-[ :-[

I fired the cKuil1 character at certain random times.
at timer = 200 cKuil1 walk to 150, 150.

Once the Kuil1 was fired, I set the cKuil.x to -1000
If fire-event had passed I reset the timer (and therefore also the cKuil.x coordinate, to wait for the next fire-event.)

I added a (cKuil1.Moving != true) restriction => now all functions work great!!

if you're interested:

Code: ags

function start_kuil(int aan){
  
  if (aan == -1) { cKuil1.x = 1000;}
  else if (aan == 1){
    
    SetFlashlightDarkness (GetFlashlightDarkness() -10); // beetje donkerder maken
    
    cKuil1.x = 163;
    cKuil1.y =  39;
    
    cKuil1.Walk(Random(300), 340, eNoBlock, eAnywhere);
    }

		
}
//###################################################################################################################################################

//###################################################################################################################################################
//***  Tikker  ***
//----------------------------------------------------------------------------------------------------------------------------------------------------
//This function telt af en kijkt of het al tijd is voor een event. Maakt gebruiker van variabele tikteller.
//----------------------------------------------------------------------------------------------------------------------------------------------------
function tikker(){
  
  tikteller = tikteller + 1;
  if ((tikteller > KUILENTIJD ) && (cKuil1.Moving != true)) {
		tikteller = 0;
		
		start_kuil(1);
  }
  else if (cKuil1.Moving != true) {start_kuil(-1);}






The kuil remained visible though, as it was first finisheing the walk() command
#45
For my game I created a translation file (.tra). Copied it into the compiled directory, and in the game editor I choose Setup.
There I pointed to the translation file, but the game is still in dutch.

next to that I cannot find a winsetup.exe file, for the user to setup the language as it used to be before.

any suggestions??
#46
okidoki

The game is in dutch...
#47
OK, indeed, the return functions was a legacy remark. It was not really used in the game.
The new compiler checks better.
Commenting out the line was sufficient.

Thanks for helping though, I have a feeling this is some kind of C++ course I am following from you guys. I am very greatful for the patience you have witrh me :-)
#48
I placed the whole little game (18 MB) on my server:

www.xs4all.nl/~koops/room7.zip

The problem is in room7.
room8, and 9 are rooms I tried to do other stuff, but I cannot remove them anymore. (probably I can delete the files form the directory I figure right now, but the zips are already uploaded) So please ignore the rooms that are not used.
The game is in room 1,3,4,7 ;-)
#49
Thanks for your ongoing interest in my problem.

I have tried the suggestions, but it does not work :-((

I did try both functions as an experiment, indeed the AreThingsOverlapping options is preferable.

I thought of an interesting feature though: in my little game I use :

cBb11.ChangeView(SelectTankView());

where SelectTankView is a functions that figures out the correct view (moving right, left, forward, on the middle, right, or left side of the road.

Moving staright forward on the left side of the road is represented by a vehicle pointing diagonally to the right (due to the perspective).

Can this have any consequences for the functions??
#50
In a room I have not touched since I moved to ags 2.72, I want to add a new object.
BUt once I open the room, I cannot save it anymore, because of the error:

"Cannot convert DEF_POSITION* into 'int'  "

it is generated on a line where I state:

return(position) 

at the end of a function:
Code: ags

function vehicle_position(int left_fwd,int right_fwd){
  //first call realtive function to calculate the relative positionchange
 relative_translation(left_fwd,right_fwd); //how much do left and right move

 fposition.x = 
     fadd ( fposition.x, 
       fadd(
	fcos_component(fpositionchange.x, fposition.orientation), 
        fsin_component(fpositionchange.y,fposition.orientation)
       )
     );
 fposition.y = 
     fadd(fposition.y,
       fadd( 
	fcos_component( fpositionchange.y, fposition.orientation ), 
        fsin_component( fpositionchange.x,fposition.orientation )
       )
     );
 fposition.orientation =
     fadd(fposition.orientation, fpositionchange.orientation);
     
 position.x = float_to_int(fposition.x);
 position.y = float_to_int(fposition.y);
 position.orientation = float_to_int(fposition.orientation);

 return(position);
 
}


I gues it has something to do with the function not being declared correctly. It was probably allowed in previous releases.
How should I declare my function as a DEF_POSITION type?


The game works fine, no errors or anything, exeprt when I try to edit this room.

In the beginning of the script, where I declare my variables I have:

Code: ags

struct DEF_POSITION{
  int x;
  int y;
  int orientation;
};


DEF_POSITION fpositionchange;
DEF_POSITION fposition;
DEF_POSITION position;



How can I solve this??
#51
Do you mean the whole game?
Where should I place it?
#52
No I hav'nt.

The functions are created using the interaction button ;-)
#53
tried it, but also when I finish the game in the regular way (cEgo.changeroom()) the second GUI (gSimlektogui) stays visible, as well as the Mouse.
The game does not shut down...

Code: ags

#sectionstart room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
Ã,  // script for room: Repeatedly execute
Ã,  if (Credits[1].IsRunning() == eCreditFinished) {
Display("Game over"); 
QuitGame(1);
Ã,  Ã, }
}
#sectionend room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE


#sectionstart room_cÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_c() {
Ã,  // script for room: Player enters screen (before fadein)
gHeartbeat.Visible = false;
gSimlektogui.Visible = false;

mouse.Visible = false;
}
#sectionend room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
#54
crash function is called in rep exec. section

Both are characters areactually called in the following way:

Code: ags

function botsing(){
 if (cBb11.IsCollidingWithChar(cKuil1) == 1)Ã,  Ã,  { 
		Display("Je bent in een gat gereden"); 
 }
}


Also tried:
Code: ags

function botsing(){
 if (character[BB11].IsCollidingWithChar(cKuil1) == 1)Ã,  Ã,  { 
		Display("Je bent in een gat gereden"); 
 }
}


both do not generate a collision...

Also I tested:
Code: ags

function botsing(){
 //if (cBb11.IsCollidingWithChar(cKuil1) == 1)    { 
 if (AreThingsOverlapping(BB11, KUIL1)) {
		Display("Je bent in een gat gereden"); 
 }
}


This does not function either.
If I replace the KUIL1 by EGO, the event does fire though (why??)

Additionaly I can mention that BB11 is the player character is this screen.
I start by

Code: ags

character[BB11].SetAsPlayer(); //beetje ouderwetse definitie


In player enters screen

Does this shine any additional light on the issue??
#55
Thanks for helping.
The baselinecheck is alright with me. The characters are both set to solid.

Am I missing something about the ID?

I have characters called by their scriptoname cCar and cHole1.

I get no collision event, and the Hole moves all the way underneath the car and comes out at the bottom to move on to y = 2000 (way beyond my window bottom line, so I guess the bottomline of the car is crossed big time)
#56
I also have a font sizxe problem.
I have imported font (ttf) too big (12 pt).
Nowe I want to reimport the fonts smaller, but I get an error saying: You cannot import a font that is already part of the game.

Can I delete fonts in any way? In order to import the fonts agin, but smaller?

P.S. Suggestions for nice font-types are welcome. I am looking for a nice and elegant font.
#57
In my game I use the following code:

Code: ags

function crash(){
 if (cCar.IsCollidingWithChar(cHole1) == 1)Ã,  Ã,  { 
		Display("You drove in an hole"); 
 }
}


The player is steering a car on a road (road passes by, car moves left and right). A cHole character comes from top to bottom, and moves under the cCar.
No collision is detected though?

Any suggestions??
#58
The final room in my game (no backgroud) is used for showing the credits.

Although I set the GUIs to be not visible, and do a QuitGame after the credits are finished, I do see the GUIs and the quit game sequence is not performed.

(I go to the final page using the transport debug ctrl-x)

Any suggestions?

the code of the room is:
Code: ags

// room script file



#sectionstart room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
Ã,  // script for Room: Player enters room (after fadein)
Ã,  
Ã,  Credits[1].CreditStyle=eCreditScrolling;
Ã,  Credits[1].DefaultCreditColour=60000;
Ã,  Credits[1].DefaultTitleColour=15;
Ã,  Credits[1].MinY =20;
Ã,  Credits[1].StartY = 250;
Ã,  
Ã,  
Ã,  Credits[1].AddTitle("Design and scripting by");
Ã,  Credits[1].AddCredit("Dr. M.C. Koops");
Ã,  //Credits[1].AddImage(2000, eCreditCentred, eCreditAlignBelow);
Ã,  Credits[1].AddTitle("Technical Advice by");
Ã,  Credits[1].AddCredit("Ing. H.P. Verbist");
Ã,  Credits[1].AddTitle("Produced by");
Ã,  Credits[1].AddCredit("Learning Games");
Ã,  Credits[1].AddTitle("using");
Ã,  Credits[1].AddCredit("AGS");
Ã,  Credits[1].AddCredit("");
Ã,  
Ã,  Credits[1].AddCredit("");
Ã,  Credits[1].AddCredit("www.learning-games.nl");
Ã,  
Ã,  Credits[1].Run();
	

}
#sectionend room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE


#sectionstart room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
Ã,  // script for room: Repeatedly execute
Ã,  if (Credits[1].IsRunning() == eCreditFinished) {
Display("Game over"); 
QuitGame(1);
Ã,  Ã, }
}
#sectionend room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE


#sectionstart room_cÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_c() {
Ã,  // script for room: Player enters screen (before fadein)
gHeartbeat.Visible = false;
gSimlektogui.Visible = false;
mouse.Visible = false;
}
#sectionend room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
#59
I looked into it, but I cannot get it to work.
Do you have an example of it??

[edit]
Hmm, I already found it : http://www.lumpcity.co.uk/~ssh/credittest.rar
#60
OK, I played around with the code, now it works fine.


Code: ags

// room script file
Overlay *textoverlay;


Overlay *TypeLine(String line, int vspacing){

Ã,  Ã, int length=0;
Ã,  Ã, int i = 0;
Ã,  Ã, String displayedline;
Ã,  Ã, int textid = 0;
Ã,  Ã, int colour = 0;
Ã,  Ã, int font = 0;
Ã,  Ã, int xpos = 20;
Ã,  
Ã,  Ã, 
Ã,  Ã, 
Ã,  length = 0; 
Ã,  i=0;
Ã,  displayedline = " ";

Ã,  Ã, textoverlay = Overlay.CreateTextual(xpos,50,400,font,colour,displayedline);

Ã,  Ã, length = line.Length;Ã,  //set string length
Ã,  Ã, while(i<length){
Ã,  Ã, 
Ã,  Ã,  Ã,  Ã, displayedline = displayedline.AppendChar(line.Chars[i]);
Ã,  Ã,  Ã,  Ã, // SetTextOverlay(textid, 10,vspacing,400, font, colour, displayedline);Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  //!!!!!!!!!!!!!!!!!!changed by spook1
Ã,  Ã,  Ã,  Ã, textoverlay.SetText(400,font,colour,displayedline);Ã,  //!!!!!!!!!!!!!!!!!!changed by spook1


Ã,  Ã,  Ã,  if (line.Chars[i]== ' ') {
Ã,  Ã,  Ã,  Ã,  Ã, Wait(10);
Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  else{
Ã,  Ã,  Ã,  Ã,  Ã, PlaySound(1);
Ã,  Ã,  Ã,  Ã,  Ã, Wait(5);
Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  i++;
Ã,  Ã, }
Ã,  Ã, return textoverlay;
}


#sectionstart region1_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function region1_a() {
Ã,  // script for Region 1: Player walks onto region
cEgo.ChangeRoom(6,196, 225);Ã,  
}
#sectionend region1_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
Ã,  // script for Room: Player enters room (before fadein)
gHeartbeat.Visible = false;
gSimlektogui.Visible =true;
Ã,  
}
#sectionend room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
Ã,  // script for Room: First time player enters room
Ã,  
textoverlay = TypeLine("Testtext",10);
}
#sectionend room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart room_cÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_c() {
Ã,  // script for Room: Player leaves room
Ã,  
textoverlay.Remove();
}
#sectionend room_cÃ,  // DO NOT EDIT OR REMOVE THIS LINE





SMF spam blocked by CleanTalk