Nameless Voice on 30/3/2017 at 00:40
Quote Posted by Daraan
with basic parallels to NV's base script. Damn I wish I would have the source files^^ Is there any chance? Please :)
I was thinking that would be very useful for people trying to set up a Squirrel base. I should look into it.
Daraan on 31/3/2017 at 17:20
Coming in the not yet finished 0.18.
Tidied up code
and as such a script doesn't exist yet. (expect setproperty)
Quote:
DCopyPropertyTrap
Similar to S&R->SetProperty but allows to copy to multiple objects as well.
Upon receiving TurnOn copies the property specified by DCopyPropertyTrapProperty form the object DCopyPropertyTrapSource to either this object or if ScriptParams links exist to these! objects.
Thus making the object with this script a sender or receiver.
---------------
Especially @NV:
I was a bit surprised, that the @-symbol worked as I know it from NVscripts
and so the question came up which other of the symbols would/could work out of the box? (I'm not at home currently so I can't try)
Code:
[me] I guess these two don't.
[source]
^Marker
^<20:Marker
^{20:Marker
&ControlDevice
&?ControlDevice
&Weighted
*Marker
@Marker
<20:Marker
{20:Marker
For the start DCopyPropertyTrapTarget is/would be hardcoded to these two options.
--------
EDIT: A parameter returning base function is now done as well.
Will adjust the other scripts and then upload an alpha version. (As atm I can't test it myself)
EDIT2: And it's up.
voodoo47 on 31/3/2017 at 18:19
Quote Posted by Daraan
DCopyPropertyTrap
I think I'm going to like this one. also, can I make a request please? I have been craving a script that would make the screen wobbly after consuming an item (poisoned, alcoholic etc) for many years now.
LarryG on 31/3/2017 at 18:53
A MakePlayerDrunk script?
voodoo47 on 31/3/2017 at 19:08
yeah.
Nameless Voice on 31/3/2017 at 22:10
Quote Posted by Daraan
I was a bit surprised, that the @-symbol worked as I know it from NVscripts
and so the question came up which other of the symbols would/could work out of the box? (I'm not at home currently so I can't try)
@Archetype was a notation that Thief already used (in conversations and other pseudoscripts), which is probably why it works there.
(I'm not sure about * off the top of my head, that might have done something in pseuoscripts too?)
All of those others are notations invented by me, so I doubt that they will work.
LarryG on 1/4/2017 at 01:41
Me, I'd like a multiple message relay trap script. Instead of being ostensibly on/off focused like NVRelayTrap, I would like a general purpose message relay trap that handles as many different messages as possible. It should support all the NVRelayTrap whizbangs (delay, once, repeat, and so on), just for more than two messages at a time. For a relay trap, which doesn't actually do anything other than pass messages (after suitable massaging as instructed), there is no real relevance to ON and OFF, so why limit the relay to just two messages, why not make it a hub instead for many messages? As long as you can assign TDest to each independently, you can have a powerhouse of a relay. And that can save script slots if you can have one script do 8 or 10 or more relays.
nightshifter on 4/4/2017 at 03:33
Quote Posted by LarryG
A MakePlayerDrunk script?
didn't NV release a (demo?)mission that had that effect???
it was a mission that also had a big hand pointing directions in ,if I recall corrrect, sewers or tunnels
LarryG on 4/4/2017 at 03:52
He did have something related in his demo, but IIRC it wasn't a true drunken player. He patched together something that almost felt like your controls weren't working, but not really. Personally, I think the only way that it can be done believably is for the player to go out to a pub at the right point in the mission, then come back at closing time and resume play. Not something that you can script easily in squirrel.
Daraan on 4/4/2017 at 19:59
So first things first (
https://www.dropbox.com/s/vbtjsc6sepueshx/DScript0.19.zip?dl=1) 0.19
Old scripts now really work. Sorry.
DGetParam got upgraded and beside that it really really works now can check for the following string parameters: (adv=1)
Code:
[me] the object itself
[source] the object that sent the triggering message
&LinkFlavor all linked objects with the specific link.
*Archetype/MetaProp all concrete objects directly descending from the given Archetype
@Archetype/MetaProp all concrete objects given Archetype and all of its descendants
^Archetype/MetaProp/Name finds the closest object.
//Something NEW: little but powerful
+Everything Single objects and combinations of the other types.
Example:
To="+[me]+&~ControlDevice+@M-DoesPatrol+coolguy"
This will give back the object itself, all ~ControlDevice'd linked objects, every object with the MetaProperty M-DoesPatrol and the object named coolguy.
Additionally DGetParam now takes 2 optional parameters adv, single.
adv=1 is used to return objects and will perform the above checks. (
objects will be returned in an array to be used with 'for obj in array')
adv=1,single=1 works only in this combination! Will return a single, not arrayed object. For example Source="&~ControlDevice" where exactly one object is needed and expected.
Quote:
A MakePlayerDrunk script?
I crawled for ages though the SS source files to get an idea how NVShakePlayer/ShakeYourBooty was scripted.... found nothing and no dang idea.
but yah here you go:
Code:
DDrunkPlayerTrapOn TurnOn makes you drunk a TurnOff sober.
Multiple Ons from the same source will reset the timer and will do a FadeIn again. Multiple sources do stack.
Optional parameters:
DDrunkPlayerTrapStrength regulates the strength basically every number can be used I would suggest something between 0 and 2 default=1
DDrunkPlayerTrapInterval a second regulator how often the effect is applied. With a lower interval higher strength becomes more acceptable. default[seconds]=0.2
DDrunkPlayerTrapLength How long the effect will last in seconds. Use 0 for until TurnOff is received default[seconds]=0
DDrunkPlayerTrapFadeIn Fades in the effect over the given time at the end the full strength is used. default[seconds]=0
DDrunkPlayerTrapFadeOut
Only works if Length is set! Will gradually make the effect weaker over the last given seconds. default[seconds]=0
DDrunkPlayerTrapMode The effect is made up by 1) shaking the camera and 2) Pushing the player.(left/right/forward). default=3
By setting Mode to 1 or 2 you can use one effect only. Especially for Mode=2 higher Strength values can be used.
Check out the demo how this can be used as a potion.I think this script needs much fine tuning to be cool, as you can even simulate an earthquake, feel free to experiment in the .nut file with the numbers as well. (Properties and Physics line).
Long Parameter names suck:rolleyes:
-----------------------
EDIT:
(
https://www.dropbox.com/s/0auwvfbt678o90s/DScript0.20c.zip?dl=1)
v0.20c
All scripts now support
[ScriptName]Count
[ScriptName]CountOnly
[ScriptName][On/Off]Capacitor
[ScriptName][On/Off]CapacitorFalloff
Copy pasting NV's description:angel::
[ScriptName]CountUse this parameter to specify the maximum number of times that the script will work. You can use [ScriptName]Count=1 to emulate the Once Trap Control Flag. The default is 0 (infinite).
Both TurnOn and TurnOff are counted by default. You can use [ScriptName]CountOnly=1 to count only TurnOn, and [ScriptName]CountOnly=2 to count only TurnOff - the respectively other message will still have their full effect even if the Count is full. Sending the trap a ResetCount message will reset the counter.
[ScriptName[On/Off]CapacitorUse this parameter to specify the number of times that a trap will need to receive its triggering message before it activates. For example, an NVRelayTrap with NVRelayTrapCapacitor=3 will only relay every third message, while one with NVRelayTrapOnCapacitor=4; NVRelayTrapOffCapacitor=2 will relay every second TurnOff message but only every fourth TurnOn message. The default is 1.
[ScriptName][On/Off]CapacitorFalloff can be used to specify the time, in [seconds], that it takes for the trap to "lose charge", and the activation count to go back down by one activation.
NOTE 1: Count and Capacitor data are refreshed on script_reload and exiting game_mode. Therefore I suggest that you insert the script_reload command into your GameMode.cmd
NOTE 2: All Capacitor parameters don't interfere with each other. For example setting Capacitor=3 and OnCapacitor=2 and then receiving TurnOff,TurnOff,TurnOn,TurnOn will relay both TurnOn messages as the first TurnOn is the 3rd message and the 2nd is the 2nd TurnOn.
Same goes for CapacitorFalloff it won't decrease an OnCapacitor only OnCapacitorFalloff will do.
-------
v0.20d
•New Parameter: $QuestVariable is now a valid.
--DGetParam lost the single parameter as now everything undergoes a string check handled by DCheckString
•DCopyPropertyTrap supports now targeting AND allows to copy multiple like for example DCopyPropertyTrapProperty="+PhysControl+RenderAlpha"
•DPortal now works with DPortalTarget and Non -PhysEnter messages. For example you can use DPortalOn="PhysExit"; (leave target blank in this case!)