Jump to content

Koni

Member
  • Content Count

    458
  • Joined

  • Last visited

  • Medals

Posts posted by Koni


  1. Set the AI driving towards a marker placed behind the road block you want it to crash into.

    I called my unit car1

    Place a trigger 30 to 40 meters in front of the roadblock facing the direction your ram raid car1 is coming from and have car1 activate it ie,

    Activation - Anybody

    Condition - car1 in thislist

    On Act - car1 forcespeed 88

    and the car1 driver will hit the gas to full speed and ram into the roadblock :)

    Tested on Utes


  2. In the middle of making a mission that will most probably be the first I ever realese for people to play.

    Basic question is, how do you like a mission to play through.

    1: Do you prefer that all the mission objectives have to be completed\succeeded in order to carry on the mission, and have to reload if you fail an objective and try again.

    2: Mission objectives are not as important so the story will continue onto the next objectives, even if you have failed the previous ones, so it's more like playing through the mission and not having to beat it.

    3: Many objectives can be failed but mission will become harder if they are, with a couple of objectives that will be an END if failed, like having to keep someone alive from point A to point B, and if they die then the mission ends.

    I'd say option 3 is my favorite, but what do the rest of you think ?

    :)


  3. The forcespeed 0.5 works well on it's own, but testing it so bob1 actually kills bad1 makes bob1 disregard the speed command for some reason, even if the forcespeed 0.5 is called after bad1 is dead.

    Looks like bob1 had got his blood up or something after killing another unit.

    Looks like we have to find a way to make bob1 forget about killing bad1 first somehow.

    ---------- Post added at 01:12 AM ---------- Previous post was at 01:03 AM ----------

    0 = bob1 knowsAbout bad1;

    This seems like it is meant to make bob1 totally forget about bad1, just playing around with it, but it's looking possible :)

    ---------- Post added at 02:18 AM ---------- Previous post was at 01:12 AM ----------

    This is as good as I can come up with at nearly 2 AM :)

    Have a trigger that will exec this script where you want bob1 to kill bad1, ie [] exec "bobkillsbad" or whatever.

    \\\\\Koni's Shoot to Kill Script/////

    ====================

    bob1 dotarget bad1;

    bob1 setunitpos "UP";

    ~1

    bob1 dofire bad1;

    dostop bob1;

    exit;

    Place another trigger.....................

    Axis a 0 - Axis b 0

    Activation Anybody Present

    Condition ! (alive bad1)

    Timeout Min 0 - Mid 0 - Max 0

    On Act. dostop bob1; 0 = bob1 knowsAbout bad1; bob1 setbehaviour "CARELESS"; bob1 setcombatmode "white"; bob1 forcespeed 0.5; bob1 setunitpos "UP";

    Now copy the above trigger and duplicate it and leave it exactly as is, but set the Timeout to.....

    Min 1 - Mid 1 - Max 1

    Same code in the On Act etc

    Now make a script with this...

    \\\\\Koni's Stay Calm Script/////

    #Start

    bob1 setunitpos "UP";

    bob1 forcespeed 0.5;

    0 = bob1 knowsAbout bad1;

    ~0.2

    goto "start"

    Save that as calm.sqs

    Now make a trigger that will execute this small script 2 seconds after bad1 dies, ie.....

    Condition ! (alive bad1)

    Timeout Min 2 - Mid 2 - Max 2

    On Act. bob1 setunitpos "UP"; [] exec "staycalm.sqs"; bob1 domove getmarkerpos "mark2";

    The main thing I find with this situation is that bob1 cannot forget about killing bad1 for upto 2 or 3 minutes, and keeps throwing himself onto the floor and crawling and even if you set him to careless and combatmode white the one time, he will still remember killing bad1 and revert back to aware\danger.

    So this setup is basically telling him he's forgotten about bad1, has to stay stood up right and walk slowly every 0.2 seconds, and for me this setup works just fine now.

    ---------- Post added at 02:54 AM ---------- Previous post was at 02:18 AM ----------

    Just playing around with this and I've near enough got the AI driver of a car to ignore large explosions close to the road, and keep on driving at full speed, without stopping and getting out of the car and crawling around, like they like to do.

    Wanted this for a cutscene a while back, so it looks like I will be able to include it after all :)


  4. Simple script, call it whatever you want, walk. maybe :)

    \\\\\Koni's Walk Script/////

    ====================

    bob1 dofire bad1;

    bob1 setbehaviour "CARELESS";

    bob1 forcespeed 0.5;

    bob1 domove getmarkerpos "mark2";

    exit;

    makes him walk nice and slowly towards the marker.

    Forcespeed 0 and the unit stays still, and anything between 0.1 upto 1 at least seems to be a slow walk and somewhere around 2 and the unit starts to run.


  5. I already have units of all sides set on the map anyway, and have spare ones set to 0% presence to make sure too lol

    Anyway, that's not really a problem anymore... but this one is, ha

    Using this to spawn an empty vehicle...

    _veh = createVehicle ["Ikarus", position logic1, [], 0, "NONE"];

    works just fine, but I have been playing round with variations on facing direction and cannot figure it out.

    What values do you type into that line to change the direction the vehicle is facing ?

    I know the ,0 seems to change the placement from the center of the logic1 position, but I have tried all sorts of combinations to try and turn it on it's axis to face in a certain direction, but not having any luck with it.

    I'd guess it's probably it's xyz values somehow ?

    ---------- Post added at 01:34 PM ---------- Previous post was at 12:58 PM ----------

    Found it.

    bus1 = createVehicle ["Ikarus", position logic1, [], 0, "bus1 = this;"];

    bus1 setDir 155;

    :D


  6. I tried that and couldn't get it to work.

    I put docsgrp = Creategroup east; in the init file, also set it to a script file and tried it in a trigger, then tried spawning the unit and nothing spawned, but if I actually named another AI unit docsgrp or whatever name I was using as a group, then the spawn unit would spawn propperly, so that's how I am spawning units now, linked to an already existing AI unit, then deletevehicle the original unit used to get the other to spawn.


  7. Thanks for your reply but I'm not trying to find out about waypoints for a spawned unit.

    I am trying to find the correct code to spawn a unit and assign it a name, ie, create a doctor and have him called Sam, so I could then use it later in a trigger like, sam domove getmarkerpos etc etc.

    Got it working to spawn a "named" unit, but to get it to spawn I have to assign it to a group already on the map, so the new spawned unit starts to run towards that group.

    I can stop the unit from running with another trigger "newguy dostop" but can I spawn a unit that dosen't have to be assigned to another units group and simply be on it's own ?


  8. Scrapped...

    I have found out the way I was spawning units cannot be refered to afterwards in any triggers etc once they have been spawned, but this way you are meant to be able to name them and refere to them after spawning

    "GUE_Soldier_AR" createUnit [getMarkerPos "enemymanmarker1", _groupAlpha,"loon1 = this ;

    this addweapon {binocular}", 0.6, "corporal"]

    taken from the BI wiki, but it does not work for me when I make it into a script to execute during a mission ?!?!

    I guess this line names the spawned unit "loon1" then ? if it did spawn ?

    Also, where would you specify the units side, like EAST, WEST and Resistance ?


  9. I'm trying to spawn some Civilians on WEST side, so Independent side will engage them.

    For preset Civilians on the map, I have simply grouped them to Blufor troops which are set to 0% Probability of Presence, so the Independent forces will shoot them on site, but I want to actually spawn some Civilians that are classed as Blufor, so they will be shot by other groups spawned on the Independent side.

    This is what I am using

    _pos = getmarkerPos "berezenemymarker1";

    _skill = [0.1, 0.5];

    _side = west;

    _units = ["RU_Citizen2", "RU_Citizen2", "RU_Citizen2", "RU_Citizen2", "RU_Citizen2", "RU_Citizen2", "RU_Citizen2", "RU_Citizen2"];

    bg1 = [_pos, _side, _units, [], [], _skill] call BIS_fnc_spawnGroup;

    sleep 3;

    {

    _x setskill ["aimingAccuracy",0.15];

    _x setskill ["spotDistance",0.75];

    _x setskill ["spotTime",0.85];

    _x setskill ["courage",0.65];

    _x setskill ["commanding",0.85];

    _x setskill ["aimingShake",0.15];

    _x setskill ["aimingSpeed",0.55];

    } foreach units bg1;

    ~2

    [bg1] join w;

    _ewp1 = bg1 addWaypoint [getMarkerpos "em1", 10];

    _ewp1 = setWaypointType "SAD";

    _ewp1 = setWaypointSpeed "NORMAL";

    _ewp1 = setWaypointFormation "STAG COLUMN";

    Just by using the side as WEST does nothing to help the Independents engage, so I put in the [bg1] join w; where unit w is a blufor soldier hidden miles away.

    Now using this script, bg1 seems to only be the leader of the group, and he will toddle off to join w and leave the rest of the group behind, but the Independents just let him go without fuss ?

    How do you name each unit if you needed to, or would you just spawn one at a time and do it that way ?

    What am I doing wrong please ?

    I got this script from a search on here, which works well for simply spawning groups, but it's the rest I can't figure out yet.

    Thanks


  10. 1) In a trigger you need the syntax:

    [b]0 = [/b][] execVM "chat.sqf"

    2) Also, for .sqf files use execVM, for .sqs files use exec.

    3) The syntax you use is sqs. I suggest rewriting it to use sqf.

    4) Is functions module placed in the mission?

    5) With functions module placed, with a true trigger with a one second delay, I put this in its On Activation field:

    0 = ["Man: blah blah blab blah",0,.84,5,1] spawn bis_fnc_dynamictext

    And the text is shown. Not sure where all your "'s came from.

    the ""'s we're from picking apart other peoples demo missions.

    Generally if there is something I don't know how to do, I will first try and search the forums, but in many cases what I want to do may exist but I don't know what it would be called to search for it, so I end up reading thread after thread for many pages and I don't seem to have much luck doing that either lol

    Then if I still can't find what I am after, I open up assorted missions from Armaholic and see if they have included in their mission what I am after doing too, then if all that fails I will post a question on here and hope I don't get flamed for not searching around for my own answer first :p

    So I seem to be stuck doing my very basic scripting in .sqs then, old habit from OFP, though I must admit I am a somewhat novice "complex" mission maker.

    People on here have said before I should be using [] execVM to execute a script from a trigger but it would never accept that, though you are the first I have noticed use the 0 = while explaining how to do it, so from now on I will try using 0 = [] execvm so I thank you for that :)

×