Jump to content


Photo

Angle doens match VO / Personell spawning at wrong FS


  • Please log in to reply
40 replies to this topic

#21 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 22 June 2010 - 04:08 PM

Not a problem, glad you got it. If you want them to spawn backed in just look at that thread i linked to. Its a very easy fix. I think one piece of codes missing, and thats defining gate6b as a constant at the top of the script like the other gates.

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#22 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 22 June 2010 - 06:44 PM

Ok, maybe i shouldn't post this here and start a new thread, but it still involves the trucks outside.
I replaced one of the USFS trucks with a HES struck now.
Everything runs fine, exept for the returning to firestation.
when you click the button, it says: this vehicle doesnt belong at the firestation.

I have the script on PasteBin.

I really cant figure out why it does this, so help would be nice.

#23 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 23 June 2010 - 02:08 AM

I think its the Ls

You have:
GameObjectList l5;
 			Game::CollectObstaclesOnVirtualObject(VO_HES, l, ACTOR_VEHICLE);
			if(l4.GetNumObjects() > 0)
			{
				Mission::PlayHint(HINT_NOSPACE);
				v.PushActionReturnToBase(ACTION_NEWLIST);
				return;
			} else
			{
				ActorList l1 = Game::GetActors(VO_HES);
				ActorList l2 = Game::GetActors(VO_EXTRA_BOTH);
			}
		}
Try this:

GameObjectList l5;
Game::CollectObstaclesOnVirtualObject(VO_HES, l5, ACTOR_VEHICLE);
if(l5.GetNumObjects() > 0)
{
Mission::PlayHint(HINT_NOSPACE);
v.PushActionReturnToBase(ACTION_NEWLIST);
return;
} else
{
ActorList l1 = Game::GetActors(VO_HES);
ActorList l2 = Game::GetActors(VO_EXTRA_BOTH);
}
}

After VO_HES you just had an l not l5. You put GameObjectList l5 on the first line and all the Ls after this need to be l5, well all the ones for the HES. I think that will solve it. ;)

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#24 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 23 June 2010 - 07:42 PM

stupid stupid stupid :blush: i did actually find the L where it should be l5, but missed the l4 xD. think i had been reading scripts for too long that night :D

Btw does it matter which number follows the L??

#25 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 23 June 2010 - 09:02 PM

In the latofirestation.script i dont think it matters aside from thing like the ALS Engines,BLS Engines, and ALS Ambulances simply because they have multiple parking spots inside the station, but for the rest of them, from what I can see it doesnt matter so long as all the Ls for that particular OBJ matches up.

Now in the other 2 fire station scripts, I believe each OBJ needs to have a different L#. I find it best to do each units in the order it appears, so if you has a HES after the USAR in LA Fire Station Start, and the USAR is l6, I would make the HES l7 and update any units after that to a new l#, but again, the ALS Engines,BLS Engines and ALS Ambos are where it gets tricky.

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#26 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 23 June 2010 - 09:07 PM

Yeah i allready figured out that those needed to bee different numbers.
but now i've changed the numbers all to l4, but it still doens't work :s
maybe a different error??

#27 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 24 June 2010 - 03:58 AM

You only have the HES listed once. Look down to object DummyCheckParked : CommandScript and look at the units under there. You need to put the HES in that section to.

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#28 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 24 June 2010 - 02:59 PM

I checked what you said, and it actually was there, BUT there was the same problem with L#.
now i fixed that, but it still doesnt work :s
I'll ad my scripts again with all the edits.

Spoiler

PasteBin

#29 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 24 June 2010 - 04:38 PM

Ok try this, on the first one. Instead of:
ActorList l1 = Game::GetActors(VO_HES);
 ActorList l2 = Game::GetActors(VO_EXTRA_BOTH);

Try:
ActorList l1 = Game::GetActorsVO_EXTRA_BOTH();
 ActorList l2 = Game::GetActors(VO_HES);


The first part of the script you want the turnto vo listed first. In the second part of the script, you want the turn to second.

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#30 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 24 June 2010 - 04:42 PM

if i see this right, you are telling the truck to park at VO_EXTRA_BOTH and aim towards VO_HES, or is this just me??

#31 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 24 June 2010 - 06:52 PM

TBH I never quite understoof it either but this is how i have my units scripts and its working fine for me. In object VcmdToFireStation : CommandScript you want it like this:
else if(StrCompare(v.GetPrototypeFileName(), OBJ_BRUSH) == 0)
		{
			GameObjectList l4;
 			Game::CollectObstaclesOnVirtualObject(VO_BRUSH, l4, ACTOR_VEHICLE);
			if(l4.GetNumObjects() > 0)
			{
				Mission::PlayHint(HINT_NOSPACE);
				v.PushActionReturnToBase(ACTION_NEWLIST);
				return;
			} else
			{
				ActorList l1 = Game::GetActors(VO_BRUSH2);
				ActorList l2 = Game::GetActors(VO_BRUSH);
			}
		}
But in the object DummyCheckParked : CommandScript section you want it like this:
else if(StrCompare(v.GetPrototypeFileName(), OBJ_BRUSH) == 0)
		{
			GameObjectList l3;
 			Game::CollectObstaclesOnVirtualObject(VO_BRUSH, l3, ACTOR_VEHICLE);
			if(l3.GetNumObjects() > 0)
			{
				Mission::PlayHint(HINT_NOSPACE);
				v.PushActionReturnToBase(ACTION_NEWLIST);
				return;
			} else
			{
				ParkinglotFound = true;
				ActorList l1 = Game::GetActors(VO_BRUSH);
				ActorList l2 = Game::GetActors(VO_BRUSH2);
			}
		}

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#32 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 24 June 2010 - 09:45 PM

i'll give it a try, thnx

#33 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 25 June 2010 - 01:58 PM

ok i tried it, but i get this error on the logfile:

?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?no door found for animation with door-type 3
?(_LAToFireStationa620): Warning: else if(StrCompare(v.GetPrototypeFileName(),OBJ_AMBULANCE02)==0||StrCompare(v.GetPrototypeFileName(),OBJ_AMBULANCE03)==0||StrCompare(v.GetPrototypeFileName(),OBJ_AMBULANCE04)==0) Missing ';'
?(_LAToFireStationa620): FILE:mod:/scripts/game/command/LAToFireStation.scripta620 LINE:414
--- load time profile begin ---
--- load time profile end ---
Destroy Network...
Deleting units...
Destroy XGUI...
Destroy Audio...
Destroy GameFramework...
Destroy GFX...
Destroy Vision...
|VisMain_cl::DeInit

|DeInitializing Object Data...

|DeInitializing World Data...

|DeInitializing Surface and Texture Data...

|Dump resources...

|...no resource leaks.

|Deallocated fast Geometry Buffer.

Destroy Input...
Destroy Scriptscheduler...
Destroy Timer...
Destroy Screen...
Destroy UpdateChain...
Destroy Console...
Destroy Filesystem...


if you check line 414, there it says:

first line is 413
		else if(StrCompare(v.GetPrototypeFileName(), OBJ_AMBULANCE02) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_AMBULANCE03) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_AMBULANCE04) == 0)
		{
			bool Possible = false;

			GameObjectList l4;
 			Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE01, l4, ACTOR_VEHICLE);
			if(l4.GetNumObjects() == 0 && !Possible)
				Possible = true;

does anyone understand this??
entire script here.



-edit-

hmm, sudenly not a single vehicle belongs to the firestation anymore :s
I have absolutely no idea how this is possible

Edited by Lithium, 29 June 2010 - 07:59 PM.
converted to code


#34 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 25 June 2010 - 04:28 PM

The error is self explanatory ;)

if(StrCompare(v.GetPrototypeFileName(),OBJ_AMBULANCE02)==0||StrCompare(v.GetPrototypeFileName(),OBJ_AMBULANCE03)==0||StrCompare(v.GetPrototypeFileName(),OBJ_AMBULANCE04)==0) Missing ';'

Your missing a ; at the end of the line ;)

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#35 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 27 June 2010 - 01:37 PM

you would think so yes, but it isn't
there doesnt belong a ; after the end of such a line because it is followed by a {.
i've tried allmost anything to fix it, but i'm affraid i'll have to use my backup and restart all over....

-edit-

btw do you have a special program to test your code before you run it ingame or something???
i think its pretty inconvenient that you have to run the game, the mod and then freeplay too test if your code works...

#36 SirMoo

SirMoo

    Captain

  • Members
  • 239 posts
  • Gender:Male
  • Location:Texas <3

Posted 27 June 2010 - 09:11 PM

you would think so yes, but it isn't
there doesnt belong a ; after the end of such a line because it is followed by a {.
i've tried allmost anything to fix it, but i'm affraid i'll have to use my backup and restart all over....

-edit-

btw do you have a special program to test your code before you run it ingame or something???
i think its pretty inconvenient that you have to run the game, the mod and then freeplay too test if your code works...


No, you may have an extra one somewhere where it's not needed. Check your files, brackets and all that jazz using Notepad2.

http://www.flos-free...h/notepad2.html

#37 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 27 June 2010 - 09:36 PM

you would think so yes, but it isn't
there doesnt belong a ; after the end of such a line because it is followed by a {.
i've tried allmost anything to fix it, but i'm affraid i'll have to use my backup and restart all over....

-edit-

btw do you have a special program to test your code before you run it ingame or something???
i think its pretty inconvenient that you have to run the game, the mod and then freeplay too test if your code works...


Oh good point, try using the code tags next time, might make the code ab it easier to read. ;)

As for testing, i wish. Its a tedious problem as you usually need to go in to the game, test, and if you have an error, you can fix the script while the mods running, but for the game to realize you changed something as as small as a ; you have to exit the game and reload the mod. You may be able to get away with just reloading the mod from the main menu but sadly I usually see problems when trying to do it this way.

Oh and Moo is right. Grab notepad2. It wont test it for you but can help you spot errors. ;)

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#38 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 28 June 2010 - 07:39 PM

As for notepad2, i allready use that. (any tips on colour scheme's??)
I'll keep checking the codes and keep you updated.

#39 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 28 June 2010 - 11:48 PM

View->Syntax->C++

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#40 timmiej93

timmiej93

    Captain

  • Members
  • 206 posts
  • Gender:Male
  • Location:Netherlands

Posted 29 June 2010 - 06:27 PM

yeah i know 'bout C++. I kinda ment special colours like comments are that colour, numbers an other etc...