Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Lua Posture

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Lua Posture Page: [1]
Login
Message << Older Topic   Newer Topic >>
Lua Posture - 2/13/2016 2:52:02 PM   
ParachuteProne

 

Posts: 207
Joined: 8/2/2004
Status: offline
I would like to have a random chance that the posture of one side can change towards the other side. (With no warning to the player except for his own posture changes))
Say a check every hour of game time and there is a random chance that posture improves or gets worse.
I haven't done much with Lua. I've checked the documentation and found how to change posture but am not sure how to do it using random events.
Could someone tell me how to write the script for this ?

Thanks
Mark
Post #: 1
RE: Lua Posture - 2/13/2016 10:29:06 PM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
I don't think timers are easily scripted using Lua. So, for a random time use a random time trigger, for a timer use a 'unit remains in area' trigger.

(in reply to ParachuteProne)
Post #: 2
RE: Lua Posture - 2/14/2016 11:40:33 AM   
ParachuteProne

 

Posts: 207
Joined: 8/2/2004
Status: offline

quote:

ORIGINAL: apache85

I don't think timers are easily scripted using Lua. So, for a random time use a random time trigger, for a timer use a 'unit remains in area' trigger.


Ok. Thanks for the info !

(in reply to Rory Noonan)
Post #: 3
RE: Lua Posture - 2/14/2016 2:16:28 PM   
Aivlis

 

Posts: 63
Joined: 12/5/2015
Status: offline
Don't quote me on this, because I haven't tried it, but if reference points anchored on a unit teleport with it (big IF), you can in theory teleport a couple of them to form a sort-of-random zone on the other side of the planet that a unit from your "Logic tools" side will cross at some point during a patrol routine, thus giving you a pseudorandom timer.

(in reply to ParachuteProne)
Post #: 4
RE: Lua Posture - 2/14/2016 4:57:34 PM   
VFA41_Lion


Posts: 228
Joined: 1/30/2014
Status: offline
You could place multiple (invisible to the player) zones in front of your units regularly patrolled pathways and use the 'unit enters area' or 'unit leaves area' triggers and set the event to repeatable. That way with 'unit remains in zone' wouldn't continuously be checking.

I think thats how it works. Depends on how frequently you want it checking, I guess.

_____________________________


(in reply to Aivlis)
Post #: 5
RE: Lua Posture - 2/15/2016 1:20:02 PM   
ParachuteProne

 

Posts: 207
Joined: 8/2/2004
Status: offline
I'll give these ideas a try. Thanks

(in reply to VFA41_Lion)
Post #: 6
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Lua Posture Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.000