Welcome, Guest. Please login or register. Did you miss your activation email?

* TUTORIAL SECTION RULES

This section is for SMOD TUTORIALS & GUIDES ONLY.
You may create a new topic in the appropriate area to share your tutorial. If you post anything off-topic here you will be temp-banned. This is so we don't hassle the moderators too much, they are volunteers.

If you need help with a tutorial, post a reply in its thread . Do not start a new topic for help here!

Author Topic: [Tutorial] Saving script aliases with game save  (Read 283 times)

0 Members and 1 Guest are viewing this topic.

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
[Tutorial] Saving script aliases with game save
« on: November 05, 2017, 01:06:46 AM »


Topic dedicated for video linked above, (little bit bare bones right now, but it will be updated with transcript and screenshots)

Mapadd ents that are used in the video
Code: [Select]

"instant_trig"{
"origin" "-6484 -1602 4"
"keyvalues" {
"Radius" "10"
"label" "nano_on"
}
}

"point_servercommand"
{
"keyvalues"
{
"targetname" "cmd"
}
}

"logic_auto"
{
"globalstate" "is_pc"
"spawnflags" "0"
"keyvalues"{
"OnLoadGame" "MATH_player_nhev_state,GetValue"
"OnLoadGame" "cmd,Command,player_nhev_state"

}
}

"math_counter"{
"keyvalues"{
"targetname" "MATH_player_nhev_state"
"startvalue" "1"
"min" "1"
"max" "2"

"outvalue" "LOGIC_player_nhev_state,invalue,,0"
"OnGetValue" "LOGIC_player_nhev_state,invalue,,0"
}
}

"logic_case"{
"keyvalues"{
"targetname" "LOGIC_player_nhev_state"
"Case01" "1"
"Case02 "2"

"OnCase01" "cmd,Command,alias player_nhev_state david_civil"
"OnCase02" "cmd,Command,alias player_nhev_state david_hev"
}
}

"entities:nano_on"
{
"event"
{
"targetname" "MATH_player_nhev_state"
"action" "setvalue"
"value" "2"
}
}


« Last Edit: November 05, 2017, 01:11:04 AM by Pepsifan04 »
DROP DATABASE bsnooch

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [Tutorial] Saving script aliases with game save
« Reply #1 on: November 05, 2017, 11:10:15 AM »
The scripting god strikes again. +rep .