Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 4-Aug-2016 05:17:32

shahbiz8
Member
From: Malaysia
Registered: 25-Feb-2016
Posts: 335

How to set plugit for this example

Hello,

How to do like this,

at time 1: keyA (press) -> (setvalue=50) VAR1
at time 2: keyS (press) -> (setvalue=50) VAR2

if value VAR1 = value VAR2 , do something.

Last edited by shahbiz8 (4-Aug-2016 05:19:23)

Offline

#2 4-Aug-2016 15:57:59

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,121
Website

Re: How to set plugit for this example

hello

do something more like
var 0
keyA -> increment var 3
keyB -> increment var 4

var.modified if var == 7 true do your thing
var.modified if var > 7 true set var = 0 (reset)

also you can use the sequential input plugit http://www.openspace3d.com/documentatio … input.html

Offline

#3 11-Aug-2016 16:35:49

shahbiz8
Member
From: Malaysia
Registered: 25-Feb-2016
Posts: 335

Re: How to set plugit for this example

hello Arkeon,

can't do like that.
I want to compare VAR1 (score point 1) and VAR2 (score point 2)

if value VAR1 > value VAR2 = player win
if value VAR1 < value VAR2 = com win
if value VAR1 = value VAR2 = draw

Offline

#4 11-Aug-2016 17:48:26

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,121
Website

Re: How to set plugit for this example

ok then

get winner :

>> multi output score.in
multi output score.out1 -> var score p1.get value
var score p1.value -> if player score equal. set value
var score p1.value -> if player score diff. set value
multi output score.out2 -> var score p2.get value -> if player score equal.equal
if player score equal.true >> draw
if player score equal.false -> if player score diff.sup
if player score diff.true >> P2 win
if player score diff.false >> p1 win

Offline

#5 12-Aug-2016 09:03:59

shahbiz8
Member
From: Malaysia
Registered: 25-Feb-2016
Posts: 335

Re: How to set plugit for this example

did not get the result, maybe something wrong.
I have send to you the sample file.

Offline

#6 12-Aug-2016 13:45:50

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,121
Website

Re: How to set plugit for this example

yes it's working you just miss a link to trigger >> multi output score.input to calc the winer result

Offline

#7 12-Aug-2016 14:03:18

shahbiz8
Member
From: Malaysia
Registered: 25-Feb-2016
Posts: 335

Re: How to set plugit for this example

Wow.. it works perfectly!!!
thank you big_smile

Offline

Board footer

Powered by FluxBB