Jump to content

kyfohatl

Member
  • Content Count

    247
  • Joined

  • Last visited

  • Medals

Everything posted by kyfohatl

  1. Indeed and excellent mod. Eventhough I can't wait for it to come out, I would like to say that its good that you are not rushing it... its going to be one hell of a good mod when it comes out though. Oh, and I support you view on voices. Their fine already, no need to change them too much (could potentially waste the time that you could have spent on more important stuff). Keep up the good work.
  2. @UNN: oops... FPDR. I even failed at copying your post. Sorry UNN, didn't mean to ruin your good scripting reputation :o. @CarlGustaffa: You are absolutely right. Your script works perfect. And yes, the previous script worked on Utes, whilst not working on Chernarus. So what your saying, is that _pos gives you three dimenstion [X,Y,Z], and the "Z" component messes it up (because of varying hights). So you use "_pos select 0 and _pos select 1" to get around it? Thanks for your help man :). Oh, and will the event handler script of written in post #3 work? (its probably very VERY wrong :o)
  3. Ohhhhh... So that's what it is. I looked at four tutorials, and I still couldn't understand what it actually does (:o). Thanks Kylania :). Anyway, thanks for all the good responses in this thread. Just like Rick Rawlings, I can't tell you how useful this thread was.
  4. Sounds good. I'm not much of an editor, but here's a tool I think is good: Squint: https://sites.google.com/site/macsarmatools/squint its really a scripting manager. It helps you find syntax errors and stuff like that. Anyway, so what youre trying to make is some sort of a tool, that manages youre editing tools and allows you to combine them (i.e. use multiple editing tools at once all in one program)? Sorry if it's a noobish question, I just wanted to get a better picture of what this tool does :). Cheers EDIT: You should probably put this thread in the Mission Editing & Scripting section.
  5. kyfohatl

    Mr Murray Editor Guide

    Thanks alot. Looking forward to your guide :bounce3:.
  6. I think t looks a bit strange too... I got it from UNN's post since I don't trust my scripting skills enough (he wrote it for me). As you know, I've asked a question about the proper use of brackets; well, this is exactly why I asked it. Anyway, according to guidelines I got from skilled scripters like yourself: we have: onMapSingleClick {CODE ---> then command ----> then array ---> then Classname} So shouldn't it be: onMapSingleClick {selectPlayer (nearestObject [_pos, 'CAManBase'? Anyway, so would this work? Theres a few things I don't understand: 1. Why am I returning a value in the Function_MapClick? I did it because the wiki did, but I don't really know why its necessary. 2. Where do I find the codes for the displays? (I of course need a code for the world map, but I couldn't find a list of display codes in the wiki) 3. How do I refer to the position I clicked on the map? At the moment I'm using "_pos", but I'm not sure if it will work. 4. Where do I put the line: (findDisplay <code for map>) displayAddEventHandler ["onMouseButtonClick", "_this call Function_MapClick"] Do I put it in init.sqs, or some script, or a trigger??? Anyway, thanks for your response :).
  7. kyfohatl

    Mr Murray Editor Guide

    Hey Mr-Murray. I've just used your ARMA guide and I must say... SIMPLY EXCELLENT. Sadly I didn't find out about your tutorial for a long time, which meant struggling with the wiki (I didn't learn much from it in the end anyway). But your guide was very well written with lots of examples and very noob friendly. Could you perahps expand on the scripting section a little? There are some good scripting tutorials, but I found that none of the tutorials could explain the basic ideas as well as you could. Anyway, keep up the good work :).
  8. kyfohatl

    Several Questions.

    Simple. In the editor, double click on the unit you want to spawn as, and in the unit box find the "Control" option. Click on it, and set the unit as "playable". Then while ingame, press "T" to bring up the team switch window, and then click on the AI unit's name to spawn as him. Or... have I missinterpreted your question?
  9. Ahhh I see. So the brakcets in the case of my example were used simply to avoid ambiguity and possible hard-to-identify errors (so really its just a good scripting practice). Thanks for the responses :bounce3:. @sbsmac: hmmm... good tool (especially for noobs like me). Downloading... ;)
  10. @ Myke and Haroon: A big thankyou to both of you. An excellent guide for brackets :). It will make my learning much easier. Also I just searched "classnames" in the wiki, and realised the difference between objects and classnames. One problem that really bogged me was the use of round brackets around "getPos Player", but as haroon said, not having the round brackets will also work. So why did the author (writer of the scripting tutorial) put them there in the first place? To emphasize that they must be processed first by the nearestObject command perhaps? Anyway thanks again for your help. It was very useful.
  11. AHHA! Just what I needed... thanks mate. I'll try to get it to work and test it out, because it will be very useful for me. Personally, I don't care if player looses his equipment in water (players should be smart enough not to cross long ponds!), but its a real pain in the ass for the AI. Anyway, thanks again. I've been looking for something like this for ages. Its good to see someone has finally made it (I was trying to do it myself, but I'm still learning how to script :))
  12. When the player's sqaud is inserted into a DAC zone, all squad members except for the player and the squad leader are reduced. How do I get around this? The reason for inserting the player squad into DAC is that the player is not the squad leader, and I want his squad to become a part of a DAC generated battle (later on his squad members are scripted to die and the player has to go lone wolf and blahblahblah...). Sorry, I don't know how to use the DAC config files very well. NOTE: for those of you who don't know, reduction is a DAC feuture via which sqad members of a squad far away from the player "dissapear" to save CPU. They reappear once close to the player.
  13. I've written the very simple script bellow, which runs in the init.sqs. It's supposed to allow the player to switch to the unit (any infantry) closest to where he clicked on the map: _nearUnit = nearestObject "Unit" onMapSingleClick "selectPlayer _nearunit" Why doesn't it work? (yeah, I know... I'm a noob) Maybe its because the object class "unit" doesn't make sense or its too broad?
  14. damn, it doesn't work well. When I tested it, it worked (on a small test mission), but as soon as I tried the script on my actual mission (which is rather large), it wouldn't work and I tried changing alot of things, but it still didn't work. Actually it worked for one guy (one of the patroling guards), so I could only switch to him, but no one else (strange, isn't it?). Does anyone know why? I think it may be because, as UNN said onMapSingleClick is unreliable, so I went off to learn about event Handlers as UNN suggested. I did alot of searching, both in the wiki and in the forums, but I still don't understand how to use them (the wiki confused the hell out of me). My understanding so far, is that an event handler basically takes an enet, say the click of a mouse (MouseButtonClick) and "tags" it to a function that does something after the "event" has taken place. Is that right? If so, how do I "tag" the MouseButtonClick event to a function (function: has something in the lines of selectPlayer (nearestObject (<position & unit class>))?
  15. I'm not much of a scripter (Kylania and ruebe are the masters), but I don't see why you couldn't use: If (<your condition>) then {doMove or whatever} Just use a trigger with a syntax of something like countCrew <name of your chopper> >= to activate the script (it checks to see if your squad has entered the heli before letting it move) @ruebe: Your a legend mate! Just what I needed. I was about to remake my mission from scratch again. Thanks :)
  16. I think you missinterpreted my request. I certainly wasn't asking how to disable the reduction feuture; I already know how to do it. Besides, it's quite useful. What I was asking was to how to get around something that seems to be a bug, because when the player squad joins a DAC zone all of his squadmates except for the squadleader are "reduced", but they shouldn't be because they are right next to the player. EDIT: Ok, just found out that this only happens when editor placed groups join a DAC zone, if the player joins a DAC generated group, the squad is not reduced. So I guess I could script his squad mates to die before joining the DAC, and then he joins DAC... it would ruin the story though.
  17. Oh yes, I too had a lot of problems with choppers. For example in one mission of mine, I wanted the chopper to extract my squad behind the enemy lines. The problem was that once the chopper saw the enmies, it would head off to shoot at them, instead of extracting us, which was really annoying. Anyway, about your question: I can't remember if this is correct, but you should give it a try. I think using the doMove (or something like that) command instead of a waypoint should fix your problem, though again, I'm not sure.
  18. @UNN: Yes...IT WORKED! Thankyou very much. I know the method I'm using is not the best option. I will definitely learn how to use the EventHandler. I'm just using this method becuase I'm a noob and really can't script well, so I stuck with the very basic stuff untill I learn some more. @Kylania: That should too. Thanks alot. With my current scripting skills, I can undrestand about 80% of it. I'm looking at a scripting tutorial right now to improve, and hopefully fully understand it.
  19. I knew there were many things wrong with it...:o Anyway, I have to use this because the units are DAC generated (dynamic AI creator), so I can't set them to playable before the mission, as they are created at the start of each mission (but I'm sure you knew that :)). Could you perhaps help me improve this retarded script? Thanks for the quick reply by the way ---------- Post added at 07:11 AM ---------- Previous post was at 06:47 AM ---------- Ok, made some improvements on the script, but it still desn't work: _nearunit = nearestObject [_pos, soldierWB] onMapSingleClick "selectPlayer _nearunit" Anyone know why?
  20. kyfohatl

    An annoying AI swimming problem

    @CarlGustaffa: Yeah... I see your point. Maybe swiming for ever with lots of equipment is not particularly realistic, but surely when marines swim across a 2 meter pond (that is barely deep enough for them to swim across anyway), they don't loose all of their equipment? And their supposed to be trained hardy soldiers... Really??? If so, could you please provide a script for it? It would be very useful for me (I would do it myself if I knew how to, but I've been learning scripting for a while and I havent gotten very far).
  21. In my mission, I want to allow the player, once he dies, to click on any AI unit on the map and take contorl of that unit (the units are generated by DAC). Does anyone know how to do this? is it possilbe? When the player dies, the trigger DAC_Marker = 3 is enabled to display units on the map for the player to chose from, but how to make it so that once the player clicks on a unit, he takes control of that unit??? Please Help. Thanks :)
  22. @UNN: Thanks alot, it seems your selectplayer command is just what I need. The only problem is that the unit that is being selected is DAC generated (dynamic AI Creator) and it is not named hence not allowing me to use select player unit Name command). Is there a way around this? I have to somehow activativate this command when the player clicks on the unit on his map. I can do a bit of scripting, but I'm a bit of a noob, so I'm going to learn a bit more scripting to see if I could make this happen. I think it would be a cool feuture. ---------- Post added at 12:00 AM ---------- Previous post was Yesterday at 11:58 PM ---------- Yeah, but as I said in my previous post, the units are generated by DAC at the start of each mission (which means that they do not have a name and cannot be set to "playable" before the mission starts in the editor).
  23. I just had a look, there are quite a few missions with "Insurgency" in their name. Could you possible give me a link to it please? Anyway, yeah, I think what I need is some sort of a "take control" command, which I could then combine with the Insurgencie's "click on the unit on the map to do..." script to allow the player to take control of the AI. The scenario is that after a reletively long singleplayer mission, the player gets to a town and kills the enemy commanding officer. This triggers a war between east and west created by DAC over a very large section of the map (includes tanks and helicopters and etc.). All units respawn in their camps and both sides have something like 800 respawns and the goal is to destroy the other side's camps to defeat that side (because they can't respawn anymore). Of course the player squad is the only group that does not respawn, and I thought this feuture would not only allow the player a limited number of respawns, but also allows him to either choose to be a squad leader or a squad member (by clicking on a DAC squad memeber rather than the squad leader). Anyway thanks for your help.
  24. kyfohatl

    An annoying AI swimming problem

    Hmmmm.... some time ago I thought this was the solution to the problem, but someone told me that invisible walls work only for the player (can't remember the thread). Though I'm not sure if this is ture. Anyway, its just anoying having to waste time putting invisible walls all around the map, especially if your using a map with lots of water like Isla Duala (then it becomes a real pain) and just like how many people have said, its not particularly realistic for a marine loose all of his equipmnet by crossing some 3 meter long pond (which they shouldn't cross in the first place because going around it would be easier). I think it would be so much easier if we could just turn it off somehow. Its just game breaking "semi-realism".
×