Page 1 of 1

singleplayer problems (many problems)

Posted: Sat Jun 23, 2007 3:30 pm
by mcunha98
First, i read tutorials in this site for started the constrution of a single player map. When i load my map none character (enemy or friend) work correctly (animation).

After tests and more tests, my map now, cause a crash in MOHAA and exit of the map.
Image

I compressed the map (47kb) and script, someone can help me please ?
http://www.4shared.com/file/18481437/fa2cc82/maps.html

I follow all steps of tutos, putting AI entites but dont work...

Hanz

Posted: Sat Jun 23, 2007 5:57 pm
by tltrude
These probably wont work, but I tried to fix it -- only two enemy. I did not test them.

(file deleted)

You should rename the files, so they do not overwrite your files.

Posted: Sat Jun 23, 2007 6:04 pm
by erick
i am not good at scripting but i would put the "exec global/ai.scr" and "exec global/loadout.scr maps/sp_98hanzmansion" under main (before waittill prespawn)
this might not do anything
and then at the bottom you wouldnt put
"exec global/missioncomplete.scr test_xx 1" (<---- i think the mapname should be yours )
as i said i am not that good at scripting so this might not help

Posted: Sat Jun 23, 2007 8:14 pm
by mcunha98
Tom

The enemys is invisible ????!!!???
In radiant ok, there are enemies, in game not !?!

Posted: Sun Jun 24, 2007 4:41 am
by mcunha98
After some hours, i finally obtain sucess !
But, there area a problem.

If i call a actor to follow me (ai -> actor -> 2nd ranger) he work for few seconds and so the console give a error. When i change this line in my script the actor dont follow, also dont exist the crash of game :oops:
$friendly2 thread global/friendly.scr::friendlythink
The error of script is:
Script Error: Cannot cast 'NIL' to float
wait self.waittime (global/friendly.scr, 1172)
The entire thread:
InitFriends:
$friendly2.friendtype = 1
$friendly2.distance = 200
$friendly2.health = 300
$friendly2 thread global/friendly.scr::friendlythink
//$friend_trigger waittill trigger
$friendly2.destination = $player
end

Posted: Sun Jun 24, 2007 1:26 pm
by jv_map
Hmm try

$friendly2.waittime = 1.0

before the call to global/friendly.scr::friendlythink .

Posted: Sun Jun 24, 2007 4:02 pm
by mcunha98
jv_map wrote:Hmm try

$friendly2.waittime = 1.0

before the call to global/friendly.scr::friendlythink .
Not yet !
Same error (i read some tutos about this, and put a key #fnum = 1 to friendly, but nothing)

Code: Select all

InitFriends:
	$friendly1.friendtype = 1
	$friendly1.distance = 80
	$friendly1.health = 300
	$friendly1 thread global/friendly.scr::friendlythink
	$friendly2.waittime = 1.8 
	//$friend_trigger waittill trigger
	$friendly1.destination = $player
end

Posted: Sun Jun 24, 2007 4:25 pm
by jv_map
Eh, in that case try

$friendly1.waittime = 1.0

:)

Posted: Sun Jun 24, 2007 7:39 pm
by mcunha98
Not yet...

Code: Select all

InitFriends:
	$friendly1.friendtype = 1
	$friendly1.distance = -128
	$friendly1.health = 300
	$friendly1 thread global/friendly.scr::friendlythink
	$friendly1.waittime = 1.8 
	//$friend_trigger waittill trigger
	$friendly1.destination = $player
end
Once work, but before not...

Posted: Mon Jun 25, 2007 1:30 am
by mcunha98
And i have another question.
Before the objective is completed, how i "tell" to player regroup with your squad to next mission ?

For example, my map is a assassination mission, before kill the officer i need tell to player back to your group and enter into a truck...

Posted: Mon Jun 25, 2007 1:23 pm
by jv_map
Oh! Sorry I'm only just getting mentally awake :)

The problem is, you're doing the friendly thing completely wrong. :wink:

The entity in radiant should have targetname friendly. In your script, you should type exec global/friendly.scr before level waittill spawn. In your script, use level.friendly1 instead of $friendly1. Then, all of a sudden, it'll all work! 8-)

Posted: Mon Jun 25, 2007 7:42 pm
by mcunha98
Thanks JV, work correctly.