Home   Help Search Login Register  

Author Topic: Err... Okay, I feel like an idiot  (Read 4028 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. ;)