Anyway, i'm going to be the cameraman, and I wanted to know something. I was going to set it in a custom map that (while noclipping on multiplayer) I would fly to a certain trigger area, press use, and the scene starts. I'm not sure how to make a trigger activate something though. Can anyone help me out?
Easy-to-answer question(s).
Moderator: Moderators
Easy-to-answer question(s).
okay, i'm starting up a project. I'm going to make a little movie of Medal of Honor. However I only know a few scripting commands. Basically the actors are going to be Bots, and the voices are being done by friends of mine (sorta like RvB, except not as futuristic.
)
Anyway, i'm going to be the cameraman, and I wanted to know something. I was going to set it in a custom map that (while noclipping on multiplayer) I would fly to a certain trigger area, press use, and the scene starts. I'm not sure how to make a trigger activate something though. Can anyone help me out?
Anyway, i'm going to be the cameraman, and I wanted to know something. I was going to set it in a custom map that (while noclipping on multiplayer) I would fly to a certain trigger area, press use, and the scene starts. I'm not sure how to make a trigger activate something though. Can anyone help me out?
Still can't figure it out. Yes I am an idiot. This is what I have:
Anyway, that's plural (questions!). The next question I have is...is there a firing animation I can activate, something along the lines of $ally anim fire or something?
Code: Select all
bot_move:
$trig waittill trigger
$ally moveto $path1
wait .5
$ally turnto $player
end
bot_move_again:
$trig2 waittill trigger
$ally moveto $path2
wait .5
$ally anim idle_crouch_grenade
$ally say warn_player_cover
endAnyway, that's plural (questions!). The next question I have is...is there a firing animation I can activate, something along the lines of $ally anim fire or something?
i think you should try runto (or walkto) rather than moveto, because moveto requires an animation to use.
as for the ai firing weapons, its possible. here i have a map and script that is victim to many many tests i have made in the past. the script is a big mess, but it execs a global script that has instructions in it. the global script is what makes the ai shoot.
all you have to do is
$aiguy fire
BUT (theres always a but)
he will shoot, and the bullets are real, but he doenst play any animation (his body doesnt kick back from the force of the gun)
you have to do some more advanced scripting to find out the correct "anim" to make him shoot and all. the global/exhaustgun.scr does it well, but its sorta buggy, and the m1garand has some probs as you can see in the test map. if you wanna see the test map, PASTE this link in your browser...
geocities.com/alc0h0lic47/aifire.zip
the name of the map is "test_exhaustgun"
as for the ai firing weapons, its possible. here i have a map and script that is victim to many many tests i have made in the past. the script is a big mess, but it execs a global script that has instructions in it. the global script is what makes the ai shoot.
all you have to do is
$aiguy fire
BUT (theres always a but)
he will shoot, and the bullets are real, but he doenst play any animation (his body doesnt kick back from the force of the gun)
you have to do some more advanced scripting to find out the correct "anim" to make him shoot and all. the global/exhaustgun.scr does it well, but its sorta buggy, and the m1garand has some probs as you can see in the test map. if you wanna see the test map, PASTE this link in your browser...
geocities.com/alc0h0lic47/aifire.zip
the name of the map is "test_exhaustgun"
Ahh yes. Well that should be easy enough. I want them to be real bullets of course. hehehe. I've got quite a plan in my head!
So, the serious thing here is, the trigger_use. I'm using a small box room that basically is my testing map. I use it for every new thing I learn (AI, Talking, Script stuff..yadda yadda). There's two Pathnodes ($path1 and $path2) and two use triggers (both surrounding any object I picked out). I go over to the use trigger, I hit use. My message comes up (Trigger one has fired OK!) for the first one, but he doesn't move. Same thing for the second one. No movement whatsoever.
So, the serious thing here is, the trigger_use. I'm using a small box room that basically is my testing map. I use it for every new thing I learn (AI, Talking, Script stuff..yadda yadda). There's two Pathnodes ($path1 and $path2) and two use triggers (both surrounding any object I picked out). I go over to the use trigger, I hit use. My message comes up (Trigger one has fired OK!) for the first one, but he doesn't move. Same thing for the second one. No movement whatsoever.
Here is a little of a map I made but didn't finish either might help . Some of the dialog is from spearhead .
scene1:
$scene1trigger waittill trigger
$scene1trigger remove
level.friendly5 nodamage
level.friendly8 thread make_full_turn $player
level.friendly8 say dfr_scripted_M5L3_13f //"Lieutenant."
level.friendly4 runto friendly_call_way
level.friendly4 waittill movedone
level.friendly4 thread make_full_turn $player
level.friendly4 say dfr_scripted_M3L1_075k //"Powell, get down the line, the Captain's needs you!"
level.friendly4 waittill saydone
$player playsound warn_player_arty_cover //"TAKE COVER!"
$start_clip remove
$player playsound arty_leadin
wait 1
thread global/exploder.scr::explode 1
exec global/earthquake.scr 1.25 .3 0 1
level.friendly4 say snd_dfr_death_generic
level.friendly4 holster
level.friendly4 exec global/setdeathanim.scr death_mortar_flip
level.friendly4 takedamage
level.friendly4 thread bhit 100
WAIT .3
level.friendly8 turnto $friendly_call_way
level.friendly8 lookat $friendly_call_way
level.friendly8 runto $friendly_call_way
level.friendly8 waittill movedone
level.friendly8 turnto level.friendly4
wait 3
level.friendly8 say dfr_T2L3_AM4103
level.friendly8 waittill saydone
wait 1
level.friendly8 turnto $medic_move_spot
level.friendly8 lookat $medic_move_spot
level.friendly8 exec global/walkto.scr $medic_move_spot
level.friendly8 lookat null
end
bhit local.damage local.location local.direction local.force:
if (local.damage == NIL || local.damage == 0)
{ local.damage = 40
}
if (local.location == NIL)
{
local.location = 3
}
else if (local.location == -1)
{
local.temp = (randomint 17 + 1)
local.location = local.temp
}
if (local.direction == NIL || local.direction == 0)
{
local.direction = (0 -1 0)
}
if (local.force == NIL)
{
local.force = 15
}
//*** set the characters script_damage variable so the player doesn't lose the level
self.script_damage = 1
//*** damage the target
self exec global/bullethit.scr local.direction local.damage local.force local.location
self playsound snd_bh_flesh
self.script_damage = 0
end
nope...that didn't work. I pasted the exact top lines of yours, just changed the names. Nothing.
Here, take a look at this. Maybe it's something with Radiant or something...
Help page with screenshots and my script...
Here, take a look at this. Maybe it's something with Radiant or something...
Help page with screenshots and my script...
ok theres a few problems with your script.
for one thing, you have level.ally. whenever you create a level, local, game, group, etc object, you have to define it first. you can not just say "level.thisdudehere say hi" you have to define level.ally. whatever the targetname is for your soldier, it will be this in the script:
$myainame
sowhatever the targetname is, you can call him in script by putting a dollar sign in front of it. so if his targetname was bob, it would be:
$bob say hi
now you CAN make him a level.ally if you create the variable level.ally and store bob in there. like this:
level.ally = $bob
so now whenever you use level.ally, you are referring to bob
you have the line "level.ally thread make_full_turn $player" you are making level.ally start a thread named make_full_turn. that thread has to be in your script. you don't have a thread named make_full_turn in your script, so it does nothing. you can either copy that thread into your script, or execute it as it is. to execute it from another script, you would give the path. lets say i have a script named "justshootme" that script is in main/global folder. inside "justshootme", there is a thread named "shoot" that thread named shoot will make my aiguy shoot. so to use that thread, I would type this:
level.ally thread global/justshootme.scr::shoot
the directory starts in main, so i type in the path (global/justshootme.scr)
the :: tells me what thread to go to. in this case it's shoot. if the thread was 'hold', it would be ::hold
now i dont know if the say you make level.ally say is an alias or not. regardless, you have to use the ALIAS of a sound. look in ubersound/uberdialog.scr to find the dialog aliases. you'll have to extract it first (as im sure you know how).
for one thing, you have level.ally. whenever you create a level, local, game, group, etc object, you have to define it first. you can not just say "level.thisdudehere say hi" you have to define level.ally. whatever the targetname is for your soldier, it will be this in the script:
$myainame
sowhatever the targetname is, you can call him in script by putting a dollar sign in front of it. so if his targetname was bob, it would be:
$bob say hi
now you CAN make him a level.ally if you create the variable level.ally and store bob in there. like this:
level.ally = $bob
so now whenever you use level.ally, you are referring to bob
you have the line "level.ally thread make_full_turn $player" you are making level.ally start a thread named make_full_turn. that thread has to be in your script. you don't have a thread named make_full_turn in your script, so it does nothing. you can either copy that thread into your script, or execute it as it is. to execute it from another script, you would give the path. lets say i have a script named "justshootme" that script is in main/global folder. inside "justshootme", there is a thread named "shoot" that thread named shoot will make my aiguy shoot. so to use that thread, I would type this:
level.ally thread global/justshootme.scr::shoot
the directory starts in main, so i type in the path (global/justshootme.scr)
the :: tells me what thread to go to. in this case it's shoot. if the thread was 'hold', it would be ::hold
now i dont know if the say you make level.ally say is an alias or not. regardless, you have to use the ALIAS of a sound. look in ubersound/uberdialog.scr to find the dialog aliases. you'll have to extract it first (as im sure you know how).
Well, before I was using $ally but it didn't work anyway. And I also tried an alias (I believe it was allied_airborne_db) but it had never worked. I don't really care about him making a full turn, because he doesn't bother moving in the first place.
I could try the if, then, else method...but i've never done something like that before
I could try the if, then, else method...but i've never done something like that before
Wait. Don't answer that.
haaah! it worked! Thanks for all your help guys! I'll name some background extras after ya. hehe. not bad for a newbie enh? 
Code: Select all
thread trigger
fadein 2 0 0 0 1
wait 2
level.script = "maps/test_cjrs.scr"
trigger:
$trigger_move waittill trigger
message "woot"
thread move
end
//FOOKIN YEA!
move:
if ($trigger_move)
{
wait .5
$ally runto $move_path
wait 4
$ally say allied_pilot_ca
$ally waittill saydone
}
end