singleplayer problems (many problems)

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

singleplayer problems (many problems)

Post 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...
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Hanz

Post 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.
Last edited by tltrude on Tue Jun 26, 2007 3:23 pm, edited 1 time in total.
Tom Trude,

Image
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Post 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
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Tom

The enemys is invisible ????!!!???
In radiant ok, there are enemies, in game not !?!
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post 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
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm try

$friendly2.waittime = 1.0

before the call to global/friendly.scr::friendlythink .
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post 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
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Eh, in that case try

$friendly1.waittime = 1.0

:)
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post 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...
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post 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...
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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-)
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Thanks JV, work correctly.
Post Reply