level.friendly1 targetname ramsey
level.friendly2 targetname durden
level.friendly3 targetname wilson
$ramsey.destination = $player
$durden.destination = $player
$wilson.destination = $player
$ramsey.friendtype = 1
$durden.friendtype = 1
$wilson.friendtype = 1
$ramsey.distance = 175
$durden.distance = 225
$wilson.distance = 250
$ramsey thread global/friendly.scr::friendlythink
$durden thread global/friendly.scr::friendlythink
$wilson thread global/friendly.scr::friendlythink
end
after waittillspawn at the top og my script i hav thread global/friendly.scr::friendlygen which is to activate the squad but they still wont follow me
btw i am new to all this
What is wrong with this script?
Moderator: Moderators
i dont know if you can give them targetnames yourself, i think they have to be part of the array still...
did you give them all an #fnum? if you did, well, if you really want to give them a different name, you can use a level variable like this:
level.ramsey = level.friendly1
level.durden = level.friendly2
etc etc
did you give them all an #fnum? if you did, well, if you really want to give them a different name, you can use a level variable like this:
level.ramsey = level.friendly1
level.durden = level.friendly2
etc etc
Wilson I presume you have give the targetnames in the map itself?
level.friendly1 targetname ramsey is not a valid line of script
level.friendly1 is a level scoped variable. If you want this to be equal to an AI in the script then you need:
level.friendly1 = $ramsey
However at the moment in your script you don't use those variables at all.
Grab me on TS and we can go through it if you like.
Also is this a single player map? If so ok, otherwise you need to refer to the array of players (i.e $player[1]) rather than just $Player
level.friendly1 targetname ramsey is not a valid line of script
level.friendly1 is a level scoped variable. If you want this to be equal to an AI in the script then you need:
level.friendly1 = $ramsey
However at the moment in your script you don't use those variables at all.
Grab me on TS and we can go through it if you like.
Also is this a single player map? If so ok, otherwise you need to refer to the array of players (i.e $player[1]) rather than just $Player
[VS-UK]Capt.Parts[BnHQ]
shouldn't it belevel.friendly1 = $ramsey
level.friendly1.targetname = ramsey
you don't need " thread global/friendly.scr::friendlygen " all you need to do is Before level waittill spawn "exec global/friendly.scr".
the first couple of lines of the global/friendly.scr are
main:
$player.entref = -1
level.friendly_auto_arrange = 1
waitthread friendlygen
end
friendlythink activates them by friendtype . when I used it I used friendlythink first and then used friendtype after but I don't know if that is needed .
you mean this part of the SDK tutorial
//----------------------------------------------------------------------------
InitFriends:
//
// Setup our friendlies to wait until the player shows up...
//----------------------------------------------------------------------------
// rename our friendlies to something more "friendly"
level.friendly1.targetname = cappy
level.friendly2.targetname = friend2
level.friendly3.targetname = friend3
thread FriendWait
end