Home   Help Search Login Register  

Author Topic: Err... Okay, I feel like an idiot  (Read 4029 times)

0 Members and 1 Guest are viewing this topic.

Dionysos

  • Guest
Err... Okay, I feel like an idiot
« on: 09 Apr 2005, 00:59:17 »
I have a rather embarassing problem. The thing is, I want to create a number of sideChats which are triggered when the player enters a camp. More precisely, I have a bunch of triggers set to Resistance-present so that when the resistance is present in the area, the first trigger is activated thus showing the first sideChat message. All the other triggers are the same with a timer so that they all activate in the proper order.
The problem is: When I enter the triggers, nothing happens. No messages, nothing. I am sure the soloution is really simple. Please help me!

Offline Pilot

  • Contributing Member
  • **
Re:Err... Okay, I feel like an idiot
« Reply #1 on: 09 Apr 2005, 01:42:37 »
Uhhh, the unit you are using is a resistance unit, right?

pazuzu

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #2 on: 09 Apr 2005, 04:59:19 »
Try grouping the unit you want to activate trigger to the trigger.

When you make a bunch of res present triggers sometimes they act funny so grouping the trigger to the unit is more reliable.

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:Err... Okay, I feel like an idiot
« Reply #3 on: 09 Apr 2005, 08:19:01 »
This sounds obvious, but it might be the problem...  ;)

If you have
Code: [Select]
guy1 sidechat "Blah", make sure you actually have a guy called guy1, and that he hasn't been killed. If he's dead, he won't do the message  ;)
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #4 on: 09 Apr 2005, 15:53:37 »
Okay, I modified the triggers so that they are only sensitive to the player. Thanks to this, the first sideChat was successfully activated and displayed. However, the second one is still AWOL. The unit who is supposed to "chat" this message is a friendly soldier on the other side of the island where the are no enemies. I walk into the triggers and the first message, which comes from the player, is activated. However, the second message, which is supposed to come from "hqman" on the other side of Nogova, is nowhere to be seen. What am I doing wrong with "hqman"?

Offline Pilot

  • Contributing Member
  • **
Re:Err... Okay, I feel like an idiot
« Reply #5 on: 09 Apr 2005, 16:06:50 »
What is the condition of the second trigger?  Also, have you named the second soldier hqman and made him resistance?

Note:
This would be easier to do in a script.  In the first trigger put this in On Activation: [player, hqman] exec "talk.sqs"

Talk.sqs:
Code: [Select]
_man1 = _this select 0
_man2 = _this select 1

_man1 sidechat "blah blah blah"
~5
_man2 sidechat "blah blah blah"
exit

The "~5" is the time between the two sidechats, change this to what works for you.

If you have any questions about it, ask me and I will gladly help you. If you don't want to use a script, that's fine, I'm simply offering different suggestions.


Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #6 on: 09 Apr 2005, 22:32:45 »
Using a script sounds great! I must confess, I am a real newbie and I would appreciate some help making this?

Will you help me?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Err... Okay, I feel like an idiot
« Reply #7 on: 09 Apr 2005, 22:51:26 »
Well, it's quite easy but extremely efficient. The easiest way is not for us to write 1000 words about scripts, because we'll always forget something. You just head over to the ed depot and read A Friendly Introduction To Code Snippets by our beloved SnYpir, and you should be able to take care of it yourself. If not, try reading the first few pages of Johan Gustavsson's Scripting Tutorial. Actually, I never finished reading that one myself. ;D

:beat: *Gets Shot* :beat:

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #8 on: 10 Apr 2005, 01:38:33 »
Well, that is the problem... I have read both those tutorials, I really have! But I got confused while trying to use it and even if I read them again, I doubt I could use this particular script to do what I want.

Man, I feel stupid!!!!

Offline Pilot

  • Contributing Member
  • **
Re:Err... Okay, I feel like an idiot
« Reply #9 on: 10 Apr 2005, 01:41:47 »
Quote
Will you help me?
I'd be glad to help.  If you have any problems incorporating the script, ask, and I (or someone else) will try to help you.

EDIT:
Don't worry about feeling stupid.  We all have to learn somewhere.
« Last Edit: 10 Apr 2005, 01:44:08 by Student Pilot »

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #10 on: 10 Apr 2005, 02:13:14 »
I'm really glad there are skilled people out there who are patient enough to deal with us newbies. I'll try that sqs as soon as I can!

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:Err... Okay, I feel like an idiot
« Reply #11 on: 10 Apr 2005, 19:02:48 »
sideChat chatText

Operand types:
chatText: String
Type of returned value:
Nothing
Description:
Type text to side radio channel. Note: this function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on them.

Example:
soldierOne sideChat "Show this text"

Thats from the comRef

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #12 on: 10 Apr 2005, 19:42:48 »
Flauta, you are confusing me!

vandeveen

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #13 on: 11 Apr 2005, 15:02:20 »
@Dionysos

why don't you try thisone:

you need:
1 x gamelogic + waypoints
1 x trigger syncronized with the first wayppoint of the game logic

the trigger fires when your guy enters the camp... that causes the gamelogic to activate its waypoints. in each "on activation"field of the gamelogics waypoints you can put your code like yourguy sidechat "yourtext".
with the timout fields of the gamelogics waypoints you can define the time intervals between the messages.

timeout fields explanation:
max = maximum time intervall
min = minimum time intervall
mid = medium time intervall

by inserting identic numbers in each fiel (max,min,mid) the delay will be exactly the way you want it to be. otherwise ofp will create a random delay between max and min parameters.


this has 2 BIG advantages:

first you only need one trigger and second you don't need a additional script.

think about it  ;)
« Last Edit: 11 Apr 2005, 15:14:51 by vandeveen »

Offline Pilot

  • Contributing Member
  • **
Re:Err... Okay, I feel like an idiot
« Reply #14 on: 12 Apr 2005, 04:50:21 »
@vandeveen
Quote
this has 2 BIG advantages:

first you only need one trigger and second you don't need a additional script.
While this would certainly work, it has two big disadvantages.  For a beginner, this method would be difficult to comprehend, and it is messier in the mission editor.  One trigger and one script are cleaner than one trigger, one gamelogic, waypoints for the gamelogic, and the synchronization needed to connect the two.  Furthermore, the script is, in my opinion, easier to edit should editing be necessary.

Just my two cents. ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Err... Okay, I feel like an idiot
« Reply #15 on: 12 Apr 2005, 10:04:45 »
Nah, for the beginner this is much easier to comprehend.   This is the way BIS would do it.

Scripting is really hard, completely new, and (at first) doesn't relate at all to the mission editor.    Most people start from a position of wanting to avoid scripts at all costs, not least because the game is designed to used without scripts.
Plenty of reviewed ArmA missions for you to play

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #16 on: 12 Apr 2005, 18:44:53 »
I'm about to start crying any second now...
The method with the Game Logic and the waypoints was succesful, almost. All the main characters messages are transmitted and displayed without a hitch. However, "hqman's" messages are still AWOL. It is as if he wasn't there. He is a resistance colonel named "hqman" who is in a town where there are no enemies so there is no way he can be killed.

WHAT IS GOING ON???  ??? >:( :'(

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Err... Okay, I feel like an idiot
« Reply #17 on: 12 Apr 2005, 19:39:30 »
If a character is going AWOL, check him out.   Play the mission as a test unit watching said colonel and see what happens to him

However, in this case, it sounds like you have  spelling mistake or typo somewhere.   Check everything again very, very carefully.  
Plenty of reviewed ArmA missions for you to play

marcus3

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #18 on: 13 Apr 2005, 16:20:34 »
did you ever get it to work?

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #19 on: 13 Apr 2005, 20:45:54 »
Okay, I tried to play as a test unit and watched the colonel during the entire mission. Nothing happened to him. Then, the sideChat trigger was triggered.

Guess what?

The message which was AWOL before was displayed but not the other ones.
It is like this:

1. From player

2. From hqman

3. From player

This time, number 2 was displayed but not 1 and 3. This might be because the "player" unit was dead, I don't know. Anyways, why did message number 2 appear this time??

What the **** is going on?

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Err... Okay, I feel like an idiot
« Reply #20 on: 13 Apr 2005, 22:12:51 »
Ok take a deep breath. Good news is that it all works at some point.  :D
I would take your guys and triggers, logics, waypoints, and whatever else that is related to the sidechat you have, group them together and copy (control "C" for in game copying) and transfer these to Desert island useing in ( pasted by control "V". ) Save it as Sidechat test or what-ever you want. Also go into mission folder and save everything  in there execpt for (mission sqm) to the new folder Sidechat Test. This way there is no interference, no enemy.
Now test and see.
It maybe timing error, two triggers going off at once, logic waypoints maybe waiting on another condition.
This is sounds compliacated, but is easy to do and good for bebugging.
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline Morglor9

  • Members
  • *
Re:Err... Okay, I feel like an idiot
« Reply #21 on: 14 Apr 2005, 00:47:19 »
i'd say figure out how to use a very simple conversation script.
Cymbaline

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #22 on: 14 Apr 2005, 07:59:54 »
I DON'T BELIEVE THIS!!!!!!!

THIS IS ALL A CRUEL JOKE!!!!!

Sharkyjoe, I followed your instructions and actually, everything worked smoothly. All the messages were triggered and displayed perfectly. Using this method, I was able to discover that I had forgot to set the timeout for the last logic waypoint. So I set it and tested it on Desert Island. Then, I went back to the actual mission and set the timeout...

NO DIFFERENCE! THE SECOND MESSAGE IS STILL AWOL IN THE MISSION, AS IF HQMAN IS DEAD OR MISSING! WHAT IS GOING ON!!!!!!!!!!????????

Offline Pilot

  • Contributing Member
  • **
Re:Err... Okay, I feel like an idiot
« Reply #23 on: 14 Apr 2005, 15:02:04 »
@Macguba
I repectfully disagree with you, A few lines of code isn't too hard to understand.  But seeing as Dionysos has already done it the BIS way, I won't press the issue.

@Dionysos
Did you change the right timeout?  Maybe you set the timeout for the wrong waypoint?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Err... Okay, I feel like an idiot
« Reply #24 on: 14 Apr 2005, 15:13:44 »
Quote
I repectfully disagree with you, A few lines of code isn't too hard to understand.
It really all depends on your upbringing.   If you are very familiar with triggers and waypoints then that is easier:  if you are very familiar with scripts then that is easier.    

The most important thing is to get the problem solved.   Dionysos, it is almost certainly some stupid little error of spelling or syntax:  or something so painfully obvious it is impossible to spot.   These things are very frustrating and very hard to find.    

OFP does occasionally go a little bit mad, and finding your own mistakes is a difficult task.   When I am completely stumped like this I delete the relevant triggers, waypoints and units and carefully recreate them, testing at every stage.   It usually works.

If hqman is apparently dead or missing, but in fact is not dead or missing, then you may have spelt his name wrong in his name field or somewhere else.   Check yet again.
« Last Edit: 14 Apr 2005, 15:18:06 by macguba »
Plenty of reviewed ArmA missions for you to play

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #25 on: 14 Apr 2005, 18:07:06 »
That's it, I surrender! I am defeated!

I can't take this any more! I have been trying for days, following all the instructions from you guys, but I can not do this! Enough! The editor is hell bent on not letting me do this!

I'm just so tired... I want this to work, but I'll have to scrap the mission and start a new one. Thank you all for trying to help! You guys are the best there ever were!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Err... Okay, I feel like an idiot
« Reply #26 on: 14 Apr 2005, 18:33:25 »
Nah, don't give up.   Just put it to one side for a couple of weeks then come back to it.    With the fresh eye you'll have it working in notime.  :)
Plenty of reviewed ArmA missions for you to play

Dionysos

  • Guest
Re:Err... Okay, I feel like an idiot
« Reply #27 on: 14 Apr 2005, 18:47:58 »
Macguba, what would I do without you? I'm really honored, being coached by the creator of the Un-Impossible mission. Thank you very much! I hope you will be around when I start working on the problem again!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Err... Okay, I feel like an idiot
« Reply #28 on: 14 Apr 2005, 19:38:50 »
dunno if this will be of any use to you, but i hashed together a missionette to show you how the scripting side would work. it's the very bare necessities so you can see what's going on.

i did also notice that if you define someone's radio with the

Code: [Select]
radioname = [WEST, "HQ"]

command, as a side other than the side which you want to hear the sidechat, it won't appear.

so for example, both characters in the sample mission are resistance. i defined one as west and true to your problem, his sidechats didn't show. but by using

Code: [Select]
radioname = [RESISTANCE, "HQ"]

there they were.

i've left that part out though, as it needlessly complicates things. i confess i've seldom used sidechats, so i don't know about getting different colours and suchlike, but hopefully this will help. i know how infuriating and frustrating these things can be, so hang in there ;)