Jump to content


Photo

Help With Counting Instances


  • Please log in to reply
2 replies to this topic

#1 bobo7264

bobo7264

    GMC Member

  • New Member
  • 30 posts

Posted 17 June 2008 - 07:11 AM

<_<


Please help! I would like to put the following into code/ script/ 'Test Expression' D&D action:

99 - instance_count(tile) = tc

Basically, I would like to set a variable called tc to 99 subtract the number of instances of an object called tile.

If you can help then thanks

- bobo7264

:D


  • 0

#2 $pecter

$pecter

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 17 June 2008 - 07:21 AM

tc=99-instance_number(tile)
  • 0

#3 Kajio

Kajio

    GMC Member

  • GMC Member
  • 2520 posts

Posted 17 June 2008 - 01:23 PM

<_<


Please help! I would like to put the following into code/ script/ 'Test Expression' D&D action:

99 - instance_count(tile) = tc

Basically, I would like to set a variable called tc to 99 subtract the number of instances of an object called tile.

If you can help then thanks

- bobo7264

:D

You messed up your syntax. When you set variables to certain values, whatever they may be, you put the variable name before the equal sign. Then, you put what the variable should be equal to, after the equal sign.

To preform other operations...
var+=# Adds
var-=# Subtracts
var/=# divides
var*= multiplies
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users