-
Posts
47 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Facocero
-
Thanks @toutenglisse, it was more or less what I was already doing. I was already trying but definitely wrong.
-
Good morning everyone. I solved it, simply by placing the function above before the if. now, just a curiosity, could i know if two identical events can coexist within a given trigger? Example: helicopter base. I land, the landig event is triggered and some things happen (mostly text messages), take off I go on a mission, when I return to base, in the new landig event, it will have to show other messages. I tried to insert two scripts for the same event with different messages, but the moment the event occurs, all the messages including the previous ones are displayed.
-
Happy Sunday everyone. Sorry cfrag, I've been trying to understand what I meant by your post in quotas since yesterday. Then I finally got it, maybe you were referring to the way I used to write the function call? ie Function (_msg)? IF yeah well it was my transcription mistake. I had to rename a few entries they were in my language, so editing made it confusing. And most likely I expressed myself badly in the previous post. My question was to understand why putting that exact same code inside an event works, lies inside if .... Then ... no! In the meantime I am reading a lot of tutorials regarding the functions, but I don't see the light yet, at least for this specific problem.
-
Thanks for the suggestion, I try, but I doubt that following the tutorials, assuming you find the right one and especially in my language, will be able to fully understand this Lua. Among other things, I'm not even a kid anymore, it's difficult for things to stay in my head. Anyway thanks anyway, very kind as always. Regards
-
good afternoon everybody. I come back to this topic again because, although everything worked great, thanks to your help, now I ran into another problem, which my inability cannot solve. Basically I would like a string to be displayed after 10 seconds in a simple if then loop. Be patient, I am trying to learn in small steps. Thank you local flag_val = trigger.misc.getUserFlag("9") if flag_val == 1 then trigger.action.outText(" First msg", 5, false) timer.scheduleFunction(_msg,{}, timer.getTime() +5) end fuction (_msg) trigger.action.outText("Second msg" , 5, false) end
-
Thanks for your help. In reality that error is due to a typographical error, because I had to extract only the part that concerned the errors and left out many other things that had nothing to do with the scripts in question.
-
Good evening everyone. I have prepared the entire script that I would need for a mission that I am preparing for two helicopters. While it works, however, anomalies do occur. Granted that not being able to test the mission with a friend, I put a second AI helicopter that lands in a certain trigger to verify the execution of the script. Everything seems to work, but I have the impression that the AI helicopter somehow makes the script haywire (I don't know how to define it) For convenience I enclose the mission for those interested in helping me. I make a clarification for who will try the test mission, if you land the AI helicopter first and then you land, a script error will probably be displayed for the AI helicopter and therefore everything works regularly, with the only oddity, that, returning to the "" start "" trigger, even if not always, the radio is activated, as if some other aircraft that does not exist asked the taxi for authorization. If, on the other hand, you land first, script errors begin to appear which, however, I take ok, continues to work even if incomplete. I mean, I've been banging my head on it since this morning, but I can't resolve the matter. Thank you test_ev.miz
-
Works! Thanks, I was the one who, overwhelmed by a hard day of work, was not concentrated enough and made a very trivial mistake.
-
@cfrag I've tried and it doesn't work, hoping I did it correctly. It doesn't give any errors, it just doesn't perform that function.
-
Yes, I tried with timer.scheduleFunction (), but I couldn't, I'm not very familiar with Lua syntax and wiki hint help, I don't find it very comprehensive for me. Unfortunately it is my limit that I am trying to overcome. Thank you for your suggestion thanks I try
-
Good evening everyone! I have a problem that I cannot solve, I have the underlying script of an event and I need that, when the event occurs, after a few seconds, I have to send a message through the trigger.action.outText function. I tried to see some examples from the wiki, but I only managed to send the message after 20 seconds from the start of the mission, however, not since I landed. Thanks in advance to those who want to help me Handler = {} function Handler:onEvent(event) if event.id == 4 and event.initiator:getDesc()["category"] == 1 then trigger.action.outText('Landing', 10, false) trigger.action.aoutText('TakeOff', 10 false) --this message, I wish I could send it after 15 seconds. end end
-
Thank you very much Grimes
-
Hello everybody, I'm back here with another question. On this topic I have done a lot of research and, if I understand correctly, it seems that it cannot be done except by resorting to MIST. So in the hope that something has changed I propose the question again. I have a landing event for a helicopter, and I need, that within the script of the aforementioned event there is a check if it is inside a trigger. Basically, if the helicopter landed inside the trigger, then take action, otherwise do nothing. By simply using the event script and using the simple editor functions, it apparently works, but it's just an illusion. Any suggestion is welcome !!
-
stop a land unit on waypoints for a few seconds before continuing
Facocero replied to Facocero's topic in Mission Editor
Thanks and sorry if I wasted your time. It works for me too now, I was the one who made a mistake in entering the seconds in the right field -
stop a land unit on waypoints for a few seconds before continuing
Facocero replied to Facocero's topic in Mission Editor
I purposely left the time suggested by the editor. And in fact it works. But I need it to stop playing for about ten seconds and it doesn't work. Even Unchecking the Time More and enabling Dur, it doesn't work, unless I leave 15 minutes as suggested for Dur as well -
Hi guys. I ran into a small problem, for which I could not find a valid solution. I have an AI ground unit, it must travel through 5 waypoints already set. The first waypont is inside a trigger. I would like it to stop for about 20 seconds at the first waypoint and then continue on its own. Using the HOLD function in Advanced Waypoint Action It seems that setting a few seconds does not work, but only at the time set by default, see attached screens. The first screens is the time that the editor suggests to me and it works, after the stop at 08.15.04 it starts again. if I set lower times it doesn't work.
-
Thanks dark_wood for your suggestion
-
Thanks for the help Rudel it works, but not for the use I have to make of it. Basically the flag has a value of 0 or 1, and when it is 0 it is not displayed.
-
Hi everyone, I started planning a small mission with two helicopters to play in multiplayer me and a friend of mine. Almost everything works if it weren't for a flag problem. So I inserted a simple script to evaluate the status of the flag for the duration of the flight. trigger.action.outText (trigger.misc.getUserFlag ('90 ') ..' This is the value of Flag 90 ', 10, true). There are several problems here. 1. if I insert repetitive action, it is updated but all the other messages that appear during the flight are hidden almost immediately. 2. if I use false instead of true, then the message loops endlessly. any advice on how to act ??
-
thank you toutenglisse I will definitely try-
-
Good morning and good Sunday to everyone. I need your valuable advice on this event. I'm rehearsing to learn something. Simple things for many, but obviously not for me. Based on the advice received in other posts, I have this script helicopter = Unit.getByName('Mdmax') Handler = {} function Handler:onEvent(event) if event.id == world.event.S_EVENT_CRASH and event.initiator == helicopeter then trigger.action.outText('crashed to the ground. ',10, true) end end world.addEventHandler(Handler) I ask two things: 1.) Is it possible to display the name of the pilot next to the text "" crashed to the ground ""? example. MdMax crashed to the ground ?? 2.) in the presence of many helicopters, identify which one, possibly crashed ??
-
Thank you for the tip!! I'll try to play around with this. Let's see what I can do. Thanks again
-
Thanks for the reply. Yes, I was already aware of the miz file, and I've also looked at the files inside it, but actually, it's not much help. I wanted to understand more about very simple things, and to be able to do something independently. The various scripts "" MIST - MOOSE - CTLD- and many others "" are too complex for me and are used to do many things that for now I do not need.
-
Hi everyone. I would like to ask you experts: once I design a small mission, will ME generate a corresponding lua file somewhere? For example a simple mission as shown in the screen
-
Trigger activation only if the helicopter lands
Facocero replied to Facocero's topic in Mission Editor
Thank you Sedlo I will definitely use it