Home   Help Search Login Register  

Author Topic: Sqs troubles  (Read 1234 times)

0 Members and 1 Guest are viewing this topic.

2488

  • Guest
Sqs troubles
« on: 06 Jul 2005, 00:45:32 »
I need these problems solved by you fine gents:

- Red tint I need to get a red tint on the screen for a short peroid, as if in pain.

- Black In/Out What code should i put in script(fairly sure the one demonstrated is correct)? And not sure how to address time in a script, such as:

Code: [Select]
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
["BLACKIN", ""] ["BLACKOUT", ""] ["BLACKIN", ""]
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::

... Need to know how to separate them with certain times (Between the black in and black out one i need the red tint)

- Action menu Unsure how to only allow a custom action menu command to just appear once. The player will start in a dead anim on the floor and a 'Get Up' command will appear on the action menu, the script for that works fine, but the 'get up' command stays ... ?

- Placing weapons on the floor As it says i need to have a weapon on the floor with a single mag (also need other mags around it)


My .sqs kinda looks like this at the moment:

Code: [Select]
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
aP setdammage 0.6
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
aP setpos [xxxx,xxxx,0]
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
["BLACKIN", ""] ["BLACKOUT", ""] ["BLACKIN", ""]
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
[aP] exec "getup.sqs"
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
aP playmove "Combatlying"
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
playmusic "xxxx"
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
aP addweapon "NVGoggles"
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::
skiptime 10
« Last Edit: 06 Jul 2005, 00:47:32 by 2488 »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Sqs troubles
« Reply #1 on: 06 Jul 2005, 04:04:02 »
hoo boy, what you need is a good script reference

~ is used to tell the script to wait
ex:
~2

each line in your sqs is its own peice of code, so you have to seperate all your blackins/blackouts  as for the red... i can't help you

i also can tell you that your setpos won't work
 you need numbers in your setpos coordinates ( [0,0,0] )

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Sqs troubles
« Reply #2 on: 06 Jul 2005, 07:50:48 »
as for the red tint, you could use a dialogue. they come in a range of pleasant colours, and best of all, can be semi-transparent. do a search in the editor's depot for 'dialogue' - vektorbosen's tutorial is the best.
« Last Edit: 06 Jul 2005, 07:51:00 by bedges »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Sqs troubles
« Reply #3 on: 06 Jul 2005, 10:33:51 »
Quote
- Red tint I need to get a red tint on the screen for a short peroid, as if in pain.
Cut resources are the way to go, since they don't block the player's controls and they can't be closed, like dialogs can. Check out this tutorial here:

http://www.ofpec.com/editors/resource_view.php?id=773

I've even made exactly what you want in the demo mission included in that tut. :)

Quote
- Placing weapons on the floor As it says i need to have a weapon on the floor with a single mag (also need other mags around it)
Place a game logic where you want the weapon. In it's init field, write this:
Code: [Select]
wpn = "weaponholder" createvehicle getpos this; wpn addweaponcargo ["m16", 1]; wpn addmagazinecargo ["m16", 1]; deletevehicle thisReplace "m16" with the classname of the weapon and magazine that you want (see the references section of the ed depot for a weapon/ammo list). Actually, instead of "weaponholder", it might need to be "primaryweaponholder"--I can't remember. :)
Quote
- Black In/Out

You need to use the cutText command (just with empty text " " of course)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

2488

  • Guest
Re:Sqs troubles
« Reply #4 on: 06 Jul 2005, 16:42:42 »
hoo boy, what you need is a good script reference

~ is used to tell the script to wait
ex:
~2

each line in your sqs is its own peice of code, so you have to seperate all your blackins/blackouts...

So it should look something like this?

Code: [Select]
~4
["BLACKIN", ""]
~3
["BLACKOUT", ""]
~4
["BLACKIN", ""]

 :)

i also can tell you that your setpos won't work
 you need numbers in your setpos coordinates ( [0,0,0] )

I used the 'xxxx' for example purposes only, I have the location.

Thanks anyway  ;)

Cut resources are the way to go, since they don't block the player's controls and they can't be closed, like dialogs can. Check out this tutorial here:

http://www.ofpec.com/editors/resource_view.php?id=773

I've even made exactly what you want in the demo mission included in that tut. :)Place a game logic where you want the weapon. In it's init field, write this:
Code: [Select]
wpn = "weaponholder" createvehicle getpos this; wpn addweaponcargo ["m16", 1]; wpn addmagazinecargo ["m16", 1]; deletevehicle thisReplace "m16" with the classname of the weapon and magazine that you want (see the references section of the ed depot for a weapon/ammo list). Actually, instead of "weaponholder", it might need to be "primaryweaponholder"--I can't remember. :)
You need to use the cutText command (just with empty text " " of course)

Thanks alot  ;D I think I had your tutorial a while ago ... The one with the burning church?

Thanks for all the replies, big help  :)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Sqs troubles
« Reply #5 on: 06 Jul 2005, 16:44:34 »
you still have to do cuttext for your blackins/blackouts, as GB said.
if you haven't looked in the comref yet, do it, it will answer a lot of your questions

you could also use titlecut

here's a little from a small cam scripting reference i made for myself to get started at cam scripting

titlecut ["caption", "effect", #]
   # = time in seconds
   effects are...
            BLACK IN
            BLACK OUT
            WHITE IN
            WHITE OUT
            PLAIN
            BOTTOM

leave "caption" as just ""
the time is how long it will take to go from black to normal or normal to black

so if you wanted it to constantly go back and forth, you would do:

titlecut ["","blackout",3]
titlecut ["","blackin",3]
titlecut ["","blackout, 3]
titlecut ["","blackin",3]

or however you want to do it
« Last Edit: 06 Jul 2005, 16:53:04 by Triggerhappy »

2488

  • Guest
Re:Sqs troubles
« Reply #6 on: 06 Jul 2005, 16:44:54 »
Now I just need to know how to make an action menu option work just once.  ???

2488

  • Guest
Re:Sqs troubles
« Reply #7 on: 06 Jul 2005, 16:58:37 »
So, that:

~7
cutText ["", "BLACK OUT"]

Or that:

~7
titlecut ["", "blackout", ??]  (?? = time duration of my choice)


 :) ???

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Sqs troubles
« Reply #8 on: 06 Jul 2005, 19:59:02 »
Now I just need to know how to make an action menu option work just once.  ???

At the top of the script run by the action, write the following:

Code: [Select]
(_this select 0) removeaction (_this select 2)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Sqs troubles
« Reply #9 on: 07 Jul 2005, 00:24:29 »
So, that:

~7
cutText ["", "BLACK OUT"]

Or that:

~7
titlecut ["", "blackout", ??]  (?? = time duration of my choice)


 :) ???

Quote
the time is how long it will take to go from black to normal or normal to black

perhaps i wasn't clear enough
the second one was closer, the 3rd part (the time) is how long is will take for the blackin/blackout to occur

so if that value was 3, it would slowly black out over a duration of 3 seconds (slowly darker until it is completely black)

just try it out with a bigger number and you'll notice what i'm talking about