Jump to content

Using interter in value (ACS)


Delisk

Recommended Posts

I fell the answer is very simple but I cannot seem to fin it. I look at quite a few tutorial but not one seem to be doing what I want to do.

 

I wish to use an integer in a value

 

I have this integer

int Trap2Brightness = 144;

 

I wish to call this integer as the brittleness value (second number) in this line

 

This work

Light_ChangeToValue (9, 120);

 

This does not

Light_ChangeToValue (9, i:Trap2Brightness);

 

Here the entire script called on some specific monsters death

 

script 3 (void)
{
Trap2MonsterKilled = Trap2MonsterKilled  + 1;
Trap2Brightness = Trap2Brightness - 10;
Light_ChangeToValue (9, i:Trap2Brightness);
print(i:Trap2Brightness);

if (Trap2MonsterKilled == 4)
 {
Door_Open (2, 64, 0);
 }

 if (Trap2MonsterKilled == 9)
 {
Delay (64);
Teleport (7, 0, 0);
 }

}

 

I know the integer work because of the print, but if i try to compile this script it tell me "Identifier has not been defined"

 

 

 

 

 

 

Share this post


Link to post

Never mind I found it

 

script 3 (void)
{
Trap2MonsterKilled = Trap2MonsterKilled  + 1;
Trap2Brightness = Trap2Brightness - 10;
Light_ChangeToValue (9, Trap2Brightness);
print(i:Trap2Brightness);

if (Trap2MonsterKilled == 4)
 {
Door_Open (2, 64, 0);
 }

 if (Trap2MonsterKilled == 9)
 {
Delay (64);
Teleport (7, 0, 0);
 }

}

 

I only needed to call the name of the variable... now I fell a bit dump

 

It seem it was the i: I got from a tutorial with the print function.

 

Any admin fell free to delete this post.

Edited by Delisk

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...